* pinfo.cc (_pinfo::dup_proc_pipe): Ignore error if the child process has just
gone away.
This commit is contained in:
parent
43634a4158
commit
9edadc960e
|
@ -1,3 +1,8 @@
|
||||||
|
2005-09-28 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* pinfo.cc (_pinfo::dup_proc_pipe): Ignore error if the child process
|
||||||
|
has just gone away.
|
||||||
|
|
||||||
2005-09-27 Christopher Faylor <cgf@timesys.com>
|
2005-09-27 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* init.cc (prime_threads): Make this static, as it should be.
|
* init.cc (prime_threads): Make this static, as it should be.
|
||||||
|
|
|
@ -1040,13 +1040,14 @@ _pinfo::dup_proc_pipe (HANDLE hProcess)
|
||||||
flags |= DUPLICATE_CLOSE_SOURCE;
|
flags |= DUPLICATE_CLOSE_SOURCE;
|
||||||
bool res = DuplicateHandle (hMainProc, wr_proc_pipe, hProcess, &wr_proc_pipe,
|
bool res = DuplicateHandle (hMainProc, wr_proc_pipe, hProcess, &wr_proc_pipe,
|
||||||
0, FALSE, flags);
|
0, FALSE, flags);
|
||||||
if (!res)
|
if (!res && WaitForSingleObject (hProcess, 0) != WAIT_OBJECT_0)
|
||||||
sigproc_printf ("DuplicateHandle failed, pid %d, hProcess %p, %E", pid, hProcess);
|
sigproc_printf ("DuplicateHandle failed, pid %d, hProcess %p, %E", pid, hProcess);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wr_proc_pipe_owner = dwProcessId;
|
wr_proc_pipe_owner = dwProcessId;
|
||||||
sigproc_printf ("closed wr_proc_pipe %p for pid %d(%u)", wr_proc_pipe,
|
sigproc_printf ("closed wr_proc_pipe %p for pid %d(%u)", wr_proc_pipe,
|
||||||
pid, dwProcessId);
|
pid, dwProcessId);
|
||||||
|
res = true;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue