* sigproc.cc (wait_subproc): Still more debugging cleanup.

This commit is contained in:
Christopher Faylor 2000-11-04 19:25:55 +00:00
parent 29578e3eeb
commit 1ae469adf4
2 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,12 @@
Sat Nov 4 14:24:10 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (wait_subproc): Still more debugging cleanup.
Sat Nov 4 00:51:38 2000 Christopher Faylor <cgf@cygnus.com> Sat Nov 4 00:51:38 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (EnumProcessesNT): Avoid 0 pids. * pinfo.cc (EnumProcessesNT): Avoid 0 pids.
(EnumProcesses9x): Ditto. (EnumProcesses9x): Ditto.
* sigproc.cc (remove_childe): Eliminate. * sigproc.cc (remove_child): Eliminate.
(proc_subproc): Move remove_child stuff here. (proc_subproc): Move remove_child stuff here.
(wait_subproc): Synchronize with proc_subproc when error occurs. Add (wait_subproc): Synchronize with proc_subproc when error occurs. Add
more debugging info. more debugging info.

View File

@ -1246,14 +1246,14 @@ wait_subproc (VOID *)
system_printf ("wait failed. nchildren %d, wait %d, %E", system_printf ("wait failed. nchildren %d, wait %d, %E",
nchildren, proc_loop_wait); nchildren, proc_loop_wait);
for (int i = 0; i < nchildren + 1; i++) for (int i = 0; i <= nchildren; i++)
if ((rc = WaitForSingleObject (events[i], 0)) == WAIT_OBJECT_0 || if ((rc = WaitForSingleObject (events[i], 0)) == WAIT_OBJECT_0 ||
rc == WAIT_TIMEOUT) rc == WAIT_TIMEOUT)
continue; continue;
else else
{ {
system_printf ("nchildren %d, event[%d] %p, pchildren[%d] %p, %E", system_printf ("nchildren %d, event[%d] %p, pchildren[%d] %p, events[0] %p, %E",
nchildren, i, events[0], i, (_pinfo *) pchildren[i]); nchildren, i, events[i], i, (_pinfo *) pchildren[i], events[0]);
system_printf ("pid %d, dwProcessId %u, progname '%s'", system_printf ("pid %d, dwProcessId %u, progname '%s'",
pchildren[i]->pid, pchildren[i]->dwProcessId, pchildren[i]->pid, pchildren[i]->dwProcessId,
pchildren[i]->progname); pchildren[i]->progname);