Skip to content

Proxy exit signals from foreground processes#16

Merged
isaacs merged 4 commits into
masterfrom
isaacs/better-signal-proxying
Nov 6, 2020
Merged

Proxy exit signals from foreground processes#16
isaacs merged 4 commits into
masterfrom
isaacs/better-signal-proxying

Conversation

@isaacs

@isaacs isaacs commented Nov 6, 2020

Copy link
Copy Markdown
Contributor

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