Repository navigation
Conversation
Forward SIGINT and SIGTERM to the script and wait for it to exit, like `npm run`. Exit with the script's exit code, or re-raise the signal that terminated it, instead of reporting failures as 1 and signal deaths as success. Refs: nodejs#65712 Assisted-by: Claude Code Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
gurgunday
reviewed
Nov 23, 2026
Comment on lines
+230
to
+233
| struct sigaction sa; | ||
| memset(&sa, 0, sizeof(sa)); | ||
| sa.sa_handler = SIG_DFL; | ||
| CHECK_EQ(sigaction(signum, &sa, nullptr), 0); |
Member
There was a problem hiding this comment.
sigaction fails for SIGKILL and SIGSTOP, as outlined here. So for those CHECK_EQ will abort with SIGABORT instead of reraising it
Not an expert in POSIX, but I remember that it should always be guarded against:
Suggested change
| struct sigaction sa; | |
| memset(&sa, 0, sizeof(sa)); | |
| sa.sa_handler = SIG_DFL; | |
| CHECK_EQ(sigaction(signum, &sa, nullptr), 0); | |
| if (signum != SIGKILL && signum != SIGSTOP) { | |
| struct sigaction sa; | |
| memset(&sa, 0, sizeof(sa)); | |
| sa.sa_handler = SIG_DFL; | |
| CHECK_EQ(sigaction(signum, &sa, nullptr), 0); | |
| } |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67736 +/- ##
==========================================
- Coverage 90.71% 90.52% -0.20%
==========================================
Files 801 803 +2
Lines 280906 285084 +4178
Branches 54249 55016 +767
==========================================
+ Hits 254832 258069 +3237
- Misses 16246 17162 +916
- Partials 9828 9853 +25
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forward
SIGINTandSIGTERMto the script run bynode --runand wait for it to exit, likenpm run. Propagate the script's exit code, or re-raise the signal that terminated it.Refs: #65712