* 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:
Christopher Faylor
2000-11-03 04:27:03 +00:00
parent 6857eb1b3b
commit bb5d559a73
10 changed files with 59 additions and 22 deletions

View File

@@ -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;
}