init not processing SIGCHLD during reboot?

Paul Smith psmith at netezza.com
Fri Dec 1 16:08:29 PST 2006


On Fri, 2006-12-01 at 17:35 -0500, Paul Smith wrote:

> So, my proposed change is to modify init.c:run() so that if the action
> is SHUTDOWN, CTLALTDEL, or RESTART, we don't block SIGCHLD before we
> fork the action.

> PS. What's the portability requirements for BB?  I notice that we're
> using SIG_IGN for SIGCHLD: in the original POSIX spec this was
> undefined... you had to install a handler to wait() or else you got
> zombies.  In the newer POSIX/SUS specs SIG_IGN on SIGCHLD will have the
> kernel release the zombie without needing a wait().  I suppose if it's
> working for current BB users, we should leave well enough alone.

Doh!  I misread (sorry, I'm doing 27 things at once here).  BB doesn't
use SIG_IGN with SIGCHLD, it only uses SIG_DFL.  So, no worries about
portability.

OK, we don't need to avoid blocking SIGCHLD (I'm not really sure why
we're going to the trouble of blocking SIGCHLD while we fork in run()
but I guess it certainly can't hurt).  We just need to have the code
that's waiting for the action to complete, also wait for any other child
that dies in the meantime (during a shutdown/restart/ctlaltdel).

I'll work on that this weekend.

-- 
-----------------------------------------------------------------------------
 Paul D. Smith <psmith at netezza.com>                       http://netezza.com
 "Please remain calm--I may be mad, but I am a professional."--Mad Scientist
-----------------------------------------------------------------------------
      These are my opinions--Netezza takes no responsibility for them.


More information about the busybox mailing list