diff options
author | Christopher Faylor <me@cgf.cx> | 2004-03-14 06:34:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-03-14 06:34:05 +0000 |
commit | f8a8e7a1f6364f620685406cf9f3a9770b1d5789 (patch) | |
tree | 5405c4afeb2e3706083ed6e2fccf951e63868a9f /winsup/cygwin/spawn.cc | |
parent | 8308950ca5611565b842800e285ad4c8378344f5 (diff) | |
download | cygnal-f8a8e7a1f6364f620685406cf9f3a9770b1d5789.tar.gz cygnal-f8a8e7a1f6364f620685406cf9f3a9770b1d5789.tar.bz2 cygnal-f8a8e7a1f6364f620685406cf9f3a9770b1d5789.zip |
* cygtls.cc (_cygtls::remove): Call remove_wq to ensure that wait stuff is
removed from proc_subproc linked list.
* cygtls.h (_cygtls::remove_wq): Declare.
* sigproc.cc (_cygtls::remove_wq): Define.
(proc_subproc): Label event handle appropriately.
* spawn.cc (spawn_guts): Return -1 when wait() fails for spawn types that
require waiting.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 992bad1ab..e7d25e976 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -912,7 +912,8 @@ spawn_guts (const char * prog_arg, const char *const *argv, break; case _P_WAIT: case _P_SYSTEM: - waitpid (cygpid, (int *) &res, 0); + if (waitpid (cygpid, (int *) &res, 0) != cygpid) + res = -1; break; case _P_DETACH: res = 0; /* Lose all memory of this child. */ |