diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-18 07:42:31 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-18 07:42:31 +0300 |
commit | 98f56d64c2c48fdb3d79e5dfa9971154a3dcccda (patch) | |
tree | a3b6ee7407c2c3b4d415b7e6ff1668d3b663cc2c /winsup/cygwin/sigproc.cc | |
parent | 1f8331ae8b5eb14f9836d65ac0641c79e136c595 (diff) |
* sigproc.cc (proc_subproc): Simplify code to just remove all zombies if
SIGCHLD == SIG_IGN.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 78e45e67f..0f4431f85 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -305,7 +305,6 @@ proc_subproc (DWORD what, DWORD val) int clearing; waitq *w; int thiszombie; - _pinfo *zombie_proc = NULL; #define wval ((waitq *) val) @@ -378,7 +377,7 @@ proc_subproc (DWORD what, DWORD val) pchildren[val]->pid, val, hchildren[val], nchildren, nzombies); thiszombie = nzombies; - zombie_proc = zombies[nzombies] = pchildren[val]; // Add to zombie array + zombies[nzombies] = pchildren[val]; // Add to zombie array zombies[nzombies++]->process_state = PID_ZOMBIE;// Walking dead sigproc_printf ("zombifying [%d], pid %d, handle %p, nchildren %d", @@ -478,13 +477,13 @@ proc_subproc (DWORD what, DWORD val) sigproc_printf ("finished processing terminated/stopped child"); else { - if (zombie_proc && zombies[thiszombie] - && zombies[thiszombie] == zombie_proc - && global_sigs[SIGCHLD].sa_handler == (void *) SIG_IGN) - remove_zombie (thiszombie); waitq_head.next = NULL; sigproc_printf ("finished clearing"); } + + if (global_sigs[SIGCHLD].sa_handler == (void *) SIG_IGN) + while (nzombies) + remove_zombie (0); break; } |