Skip to content

Commit d1d487c

Browse files
Profpatschkritzcreek
authored andcommitted
mkOnClose reacts to the 'close' signal instead of 'exit'
According to the node documentation: “`'close'` is distinct from the 'exit' event, since multiple processes might share the same stdio streams.” https://nodejs.org/api/child_process.html#child_process_event_close
1 parent 2a1f094 commit d1d487c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Node/ChildProcess.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ exports.mkOnClose = function mkOnClose (mkChildExit) {
8888
return function onClose (cp) {
8989
return function (cb) {
9090
return function () {
91-
cp.on('exit', function (code, signal) {
91+
cp.on('close', function (code, signal) {
9292
cb(mkChildExit(code)(signal))();
9393
});
9494
};

0 commit comments

Comments
 (0)