* 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.
This commit is contained in:
Christopher Faylor
2004-03-14 06:34:05 +00:00
parent 8308950ca5
commit f8a8e7a1f6
5 changed files with 30 additions and 2 deletions

View File

@@ -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. */