-
Notifications
You must be signed in to change notification settings - Fork 2.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
node:child_process#spawn
doesn't fire close
event if app exits immediately after spawned app exits
#3083
Comments
bun/src/bun.js/child_process.exports.js Line 1095 in 0f2a79b
calls: bun/src/bun.js/child_process.exports.js Line 939 in 0f2a79b
Only I check with this underlying impl, and the issue is bun/src/bun.js/child_process.exports.js Lines 1083 to 1102 in 0f2a79b
|
When I add So the issue seems to be that the program exits before the |
node:child_process#spawn
doesn't fire close
eventnode:child_process#spawn
doesn't fire close
event if app exits immediately after spawned app exits
The issue still persists in 1.0.1 const { spawn } = require("node:child_process");
function exitHandler(code, signal) {
console.log(code, signal);
}
const p = spawn("ls", ["-l"]);
p.on("exit", exitHandler);
p.on("close", exitHandler); both |
What version of Bun is running?
0.6.3
What platform is your computer?
Darwin 22.2.0 arm64 arm
What steps can reproduce the bug?
Try the example from here: https://nodejs.org/api/child_process.html#event-close
What is the expected behavior?
Node.js
What do you see instead?
Bun
Additional information
This prevents
fb-watchman
package from working.The text was updated successfully, but these errors were encountered: