* 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:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user