* sigproc.cc (proc_subproc): Simplify code to just remove all zombies if
SIGCHLD == SIG_IGN.
This commit is contained in:
parent
1f8331ae8b
commit
98f56d64c2
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-17 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* sigproc.cc (proc_subproc): Simplify code to just remove all zombies
|
||||||
|
if SIGCHLD == SIG_IGN.
|
||||||
|
|
||||||
2003-12-17 Christopher Faylor <cgf@redhat.com>
|
2003-12-17 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* pinfo.h (pinfo::operator ==): Add a way to check for _pinfo types.
|
* pinfo.h (pinfo::operator ==): Add a way to check for _pinfo types.
|
||||||
|
@ -305,7 +305,6 @@ proc_subproc (DWORD what, DWORD val)
|
|||||||
int clearing;
|
int clearing;
|
||||||
waitq *w;
|
waitq *w;
|
||||||
int thiszombie;
|
int thiszombie;
|
||||||
_pinfo *zombie_proc = NULL;
|
|
||||||
|
|
||||||
#define wval ((waitq *) val)
|
#define wval ((waitq *) val)
|
||||||
|
|
||||||
@ -378,7 +377,7 @@ proc_subproc (DWORD what, DWORD val)
|
|||||||
pchildren[val]->pid, val, hchildren[val], nchildren, nzombies);
|
pchildren[val]->pid, val, hchildren[val], nchildren, nzombies);
|
||||||
|
|
||||||
thiszombie = 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
|
zombies[nzombies++]->process_state = PID_ZOMBIE;// Walking dead
|
||||||
|
|
||||||
sigproc_printf ("zombifying [%d], pid %d, handle %p, nchildren %d",
|
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");
|
sigproc_printf ("finished processing terminated/stopped child");
|
||||||
else
|
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;
|
waitq_head.next = NULL;
|
||||||
sigproc_printf ("finished clearing");
|
sigproc_printf ("finished clearing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (global_sigs[SIGCHLD].sa_handler == (void *) SIG_IGN)
|
||||||
|
while (nzombies)
|
||||||
|
remove_zombie (0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user