Different behavior of exit listener of spawned process #25137
Labels
child_process
Issues and PRs related to the child_process subsystem.
question
Issues that look for answers.
Process started by
child_process
module can start its own child process. For exampletar
can start child process if we use it in concrete directory. And if we choose unexisting directory for archive destination it can fail in different way:The problem here is that on NodeJS <8.2.0 it's always exit with code 2 because child process emit this exit code.
For example this script
example.js
:will receive exit code 2 always on NodeJS 8.1.4 and this result on 8.2.0:
Why it happens? Is it correct behavior? What is right workaround for this case: handle signal in
exit
listener?The text was updated successfully, but these errors were encountered: