revert erroneous checkin

This commit is contained in:
Christopher Faylor 2005-10-11 18:39:02 +00:00
parent d9b8d62966
commit daed3bec54
2 changed files with 2 additions and 6 deletions

View File

@ -103,7 +103,6 @@ main(int argc, char **argv)
what = "child"; what = "child";
} }
if (argc > 1) sleep (10);
if (pid == -1) if (pid == -1)
perror_exit ("fork failed"); perror_exit ("fork failed");

View File

@ -128,7 +128,7 @@ get_child (DWORD id)
} }
static void static void
remove_child (FILE *ofile, DWORD id) remove_child (DWORD id)
{ {
child_list *c; child_list *c;
if (id == lastid) if (id == lastid)
@ -138,9 +138,6 @@ remove_child (FILE *ofile, DWORD id)
{ {
child_list *c1 = c->next; child_list *c1 = c->next;
c->next = c1->next; c->next = c1->next;
DWORD n = 0xdeadbeef;
GetExitCodeProcess (c1->hproc, &n);
fprintf (ofile, "process %u exited with status %p\n", id, n);
free (c1); free (c1);
return; return;
} }
@ -630,7 +627,7 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
break; break;
case EXIT_PROCESS_DEBUG_EVENT: case EXIT_PROCESS_DEBUG_EVENT:
remove_child (ofile, ev.dwProcessId); remove_child (ev.dwProcessId);
break; break;
case EXCEPTION_DEBUG_EVENT: case EXCEPTION_DEBUG_EVENT:
if (ev.u.Exception.ExceptionRecord.ExceptionCode != if (ev.u.Exception.ExceptionRecord.ExceptionCode !=