Skip to content

Conversation

@isaacs
Copy link
Contributor

@isaacs isaacs commented Nov 6, 2020

This makes it so that the main process will be terminated with the same
signal that a foreground (ie, stdio: 'inherit') process receives.

Thus, if you kick off a long-running script with npm run, and then
^C to terminate it, the main process will exit with that signal,
instead of treating the signal exit as an error and printing npm's error
banner.

Fixes: npm/cli#2124

References

This makes it so that the main process will be terminated with the same
signal that a foreground (ie, `stdio: 'inherit'`) process receives.

Thus, if you kick off a long-running script with `npm run`, and then
`^C` to terminate it, the main process will exit with that signal,
instead of treating the signal exit as an error and printing npm's error
banner.

Fixes: npm/cli#2124
@isaacs isaacs merged commit 1ba5c65 into master Nov 6, 2020
@lukekarrys lukekarrys deleted the isaacs/better-signal-proxying branch February 23, 2022 00:33
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.

[BUG] SIGINT (ctrl+c) makes npm 7 print error log

2 participants