* signal.cc (_pinfo::kill): Return success on kill(0) only if pid exists or is

in PID_EXITED state.  Report pid 0 when pid does not exist rather than pid -1.
Make debug output reflect actual function call.
* sigproc.cc (stopped_or_terminated): Set process state to reaped when we've
finished waiting for it.
* include/sys/cygwin.h (PID_REAPED): New enum.
This commit is contained in:
Christopher Faylor
2011-05-05 00:31:22 +00:00
parent 942945956c
commit 5069a2b0d9
4 changed files with 16 additions and 5 deletions

View File

@ -1041,6 +1041,7 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child)
}
else
{
child->process_state = PID_REAPED;
w->status = (__uint16_t) child->exitcode;
add_rusage (&myself->rusage_children, &child->rusage_children);