-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
npm ignores process signals when bundled with node >=20.3.0 #48946
Labels
wrong repo
Issues that should be opened in another repository.
Comments
ryanrasti
referenced
this issue
in NixOS/nixpkgs
Jul 27, 2023
v20.3.0 contains an upgrade from npm 9.6.7 to 9.8.1 so chances are good it's a change in behavior in npm, not node. Further evidence: sending signals directly to the node process works as expected. Can you report this to upstream npm? It's not actionable for us. |
2 tasks
I'm going to close this as it appears to be a npm bug, not a node one, let me know if I'm missing something and should re-open this. |
Adding links.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v20.5.0
Platform
Linux nixos 5.15.93 #1-NixOS SMP Thu Feb 9 10:26:48 UTC 2023 x86_64 GNU/Linux
Subsystem
npm
What steps will reproduce the bug?
The below script sends a SIGTERM to the npm process that spawned it. Run
npm run test
with:In package.json
In
test.js
How often does it reproduce? Is there a required condition?
release >= 20.3.0: Always reproduces.
release <= 20.2.0: Can't reproduce.
What is the expected behavior? Why is that the expected behavior?
Expected that the above program exits with code 0 (i.e.,
npm
is aborted by the signal and the script handles the signal as well)What do you see instead?
Program exits with code 1 (
npm
doesn't appear to receive the signal).npm
itself also doesn't abort.Additional information
All-in-one command to reproduce. Run
nix-build repro.nix
where repro.nix has content:To get the working version (node v20.2.0), replace the
import
statement above with:This is the breaking nix commit.
The text was updated successfully, but these errors were encountered: