diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-05 19:03:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-05 19:03:54 +0400 |
commit | b8424c5e9a7aaa08ece65fd1e67deeb4437050cf (patch) | |
tree | ff94cbf60cb5b41c18c8c0444ae5f1dd8f83eac1 /winsup/cygwin/pinfo.cc | |
parent | 1395dac1d021fa42b0a5de32de91a076d1e6d58a (diff) |
* fork.cc (fork): Clear PID_REAPED.
* pinfo.cc (pinfo_init): Ditto.
(pinfo::init): Check for PID_REAPED.
* sigproc.cc (stopped_or_terminated): Ditto.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 4d7bc158d..2096475a9 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -111,7 +111,7 @@ pinfo_init (char **envp, int envc) } myself->process_state |= PID_ACTIVE; - myself->process_state &= ~(PID_INITIALIZING | PID_EXITED); + myself->process_state &= ~(PID_INITIALIZING | PID_EXITED | PID_REAPED); debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid); } @@ -302,10 +302,10 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) region to exist for a while after a process has exited. This should only be a brief occurrence, so rather than introduce some kind of locking mechanism, just loop. */ - if (!created && createit && (procinfo->process_state & PID_EXITED)) + if (!created && createit && (procinfo->process_state & (PID_EXITED | PID_REAPED))) { debug_printf ("looping because pid %d, procinfo->pid %d, " - "procinfo->dwProcessid %u has PID_EXITED set", + "procinfo->dwProcessid %u has PID_EXITED|PID_REAPED set", n, procinfo->pid, procinfo->dwProcessId); goto loop; } |