[BusyBox] Init does not always reap child processes

Jason Schoon floydpink at gmail.com
Fri Jul 29 16:07:51 UTC 2005


It is possible to specify a flag of SA_NOCLDWAIT to the signal handler
that does that, but it has a history of being fairly unreliable.

Otherwise, you want somebody to handle reading the return result
somewhere, and in this case init is the guy.  These are children whose
parents are gone and were inherited by init.

(Okay, I must also confess that I haven't spent a huge amount of time
playing with signals and/or init.  I have learned far more about them
in the few weeks than I ever really wanted to.)

On 7/29/05, Mike Frysinger <vapier at gentoo.org> wrote:
> On Friday 29 July 2005 11:02 am, Jason Schoon wrote:
> > My fix was to enable SIGCHLD handling while in a wait action, and then
> > disable it again upon leaving the wait action.  The child handler
> > simply does a waitpid() without hanging around.
> 
> i thought if you set the handler for SIGCHLD to SIG_IGN the zombies are taken
> care of for you so you dont have to screw around with waitpid ... or am i
> thinking of someone else ?
> -mike
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>



More information about the busybox mailing list