[PATCH] zombie processes (maybe was: init does not kill reparented processes)

Denys Vlasenko vda.linux at googlemail.com
Fri Jan 4 18:15:16 UTC 2008


On Friday 04 January 2008 15:28, Ralf Friedl wrote:
> Harald Küthe wrote:
> > Our inittab calls a startscript which is not ended during runtime, but
> > only when the settopbox shuts down.
> >   
> I would consider this an application error and not a problem of init.
> 
> > There exists a patch which is hanging around in our development tree for
> > ages now which we used to avoid zombie processes.
> > This is maybe related to some old stuff found here:
> > http://www.busybox.net/lists/busybox/2004-August/012422.html
> >   
> This patch will solve your zombie problem, but it will only work because 
> you don't use any other of init's functions.
> 
> init will loop in waitfor(), waiting for your start script to stop, 
> which it will not. The only difference is that with the patch init will 
> wait for other processes. But init will not start any other processes 
> that should run from inittab. This is probably not important for you 
> because you don't have other actions in inittab.

Yes, I think the way they Harald uses init is non-typical.
He can just start that never-finishing script INSTEAD of init.

However, this usage, however untypical, is valid, and init needs
to wait for all orphaned children. People expect this behavior.
That's why I applied the patch.
--
vda



More information about the busybox mailing list