mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
This requires that onExit() is not called immediately upon receiving a SIGCHLD. There could still be data in the pipez. So, instead just set a flag and invoke the pipe watchers. Sometimes one will not receive an EOF from pipes because the process was killed by a SIGTERM, or something. If SIGCHLD has been recved but we are getting EAGAIN, the pipez need to be closed too.