* pinfo.cc (pinfo::init): Reverse order of setting status and pid info in an
execed process to avoid a race. * sigproc.cc (wait_subproc): Print more info when a WFSO error occurs. * automode.c: New file. * syscalls.cc (close_all_files): Streamline slightly. * cygheap.cc (ccalloc): Clear *entire* allocated array.
This commit is contained in:
@@ -1250,7 +1250,7 @@ wait_subproc (VOID *)
|
||||
closed a handle in the children[] array. So, we try looping a couple
|
||||
of times to stabilize. FIXME - this is not foolproof. Probably, this
|
||||
thread should be responsible for closing the children. */
|
||||
if (++errloop < 10 && GetLastError () == ERROR_INVALID_HANDLE)
|
||||
if (++errloop < 10)
|
||||
continue;
|
||||
|
||||
system_printf ("wait failed. nchildren %d, wait %d, %E",
|
||||
@@ -1261,7 +1261,9 @@ wait_subproc (VOID *)
|
||||
rc == WAIT_TIMEOUT)
|
||||
continue;
|
||||
else
|
||||
system_printf ("event[%d] %p, %E", i, events[0]);
|
||||
system_printf ("event[%d] %p, pid %d, dwProcessId %u, progname '%s', %E", i,
|
||||
events[0], pchildren[i]->pid, pchildren[i]->dwProcessId,
|
||||
pchildren[i]->progname);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user