-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Handle Signals #171
Handle Signals #171
Conversation
Codecov Report
@@ Coverage Diff @@
## master #171 +/- ##
==========================================
- Coverage 92.94% 92.58% -0.37%
==========================================
Files 22 22
Lines 468 472 +4
==========================================
+ Hits 435 437 +2
- Misses 33 35 +2
Continue to review full report at Codecov.
|
Thank you for this PR. I had not noticed the second parameter. Generally LGTM, but the signal-numbers package has been deprecated. Would you know another option? |
Good point about the |
Well, in that case, I want to have that numbers in itself instead of using the package. Because I have experienced malicious code injection via inactive packages (#149), I want not to use deprecated packages. |
Not a problem! I've addressed the fix @mysticatea! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you very much!
is there a plan to release this? latest version in npm doesn't have this fix |
The latest release of npm-run-all does not fix this bug: mysticatea/npm-run-all#171
The latest release of npm-run-all does not fix this bug: mysticatea/npm-run-all#171
The latest release of npm-run-all does not fix this bug: mysticatea/npm-run-all#171
The latest release of npm-run-all does not fix this bug: mysticatea/npm-run-all#171
The latest release of npm-run-all does not fix the signaling handling bug: mysticatea/npm-run-all#171
We discovered an issue where
npm-run-all
swallows errors caused by the v8 runtime, specifically, theSIGABRT
signal sent when the node process experiences aJavaScript heap out of memory
error.From the documentation available https://nodejs.org/api/child_process.html, it indicates that when the process closes, if the code provided is
null
, then the subprocess terminated due to a signal.The standard behaviour that NodeJS implements when running code that causes these errors directly is to return an exit code of 128 plus the value of the signal code.
This PR does one thing, checks to see if the
code
is null, and a signal was provided, convert the signal to it's number version, and then mutates the return code used by the rest ofnpm-run-all
by adding 128 to the signal value.