Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the promise version of execFile #50

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Use the promise version of execFile #50

merged 1 commit into from
Jan 17, 2022

Conversation

binarybaron
Copy link
Contributor

@binarybaron binarybaron commented Jan 17, 2022

Using the sync method of execFile which results in a blockage of the main thread is no longer necessary because the upstream issue that introduced this has been fixed nodejs/node#28325

index.js Outdated
}
});
});
const {stdout, psPid} = await execFile('ps', [flags, psFields], {maxBuffer: TEN_MEGABYTES});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. Where is the pdPid property coming from?

Copy link
Contributor Author

@binarybaron binarybaron Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I am not sure why the tests passed anyway. Can you take a look at my most recent tweak? Should work now

@sindresorhus sindresorhus merged commit 7aceb0a into sindresorhus:main Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants