bugfix: Properly exit a process.
authorRyan <ry@tinyclouds.org>
Wed, 24 Jun 2009 11:44:12 +0000 (13:44 +0200)
committerRyan <ry@tinyclouds.org>
Wed, 24 Jun 2009 11:44:12 +0000 (13:44 +0200)
commit7363ccd27324c31e9fdab6c196fad9040136821f
tree9277606bd59bd5bc91db9a00a4af03d3520c9236
parent0e67b34c27755b5258c8a1600ca80b08979ff592
bugfix: Properly exit a process.

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.
src/process.cc
src/process.h
test/mjsunit/test-process-buffering.js [new file with mode: 0644]