[BusyBox] Init

Thomas Gleixner tglx at linutronix.de
Sun Aug 25 06:18:03 UTC 2002


On Sunday, 25. August 2002 12:54, Vladimir N. Oleynik wrote:
Vladimir,

> Yes. I found SETSIG(sa, SIGCHLD,  chld_handler, SA_RESTART); in
> main_loop(). You must send patch :))

--- init.org.c  Fri Mar 29 01:59:44 2002
+++ init.c      Sat Aug 24 12:28:30 2002
@@ -1055,6 +1055,7 @@
        signal(SIGCONT, cont_handler);
        signal(SIGSTOP, stop_handler);
        signal(SIGTSTP, stop_handler);
+       signal(SIGCHLD, SIG_IGN);
 
        /* Turn off rebooting via CTL-ALT-DEL -- we get a 
         * SIGINT on CAD so we can shut things down gracefully... */

> I not found documentaion for
> signal(SIGCHLD, SIG_IGN) = automating equivalent call
> waitpid(-1, &st, WNOHANG) for SIGCHLD :0 .

linux/kernel/signal.c

* Note the silly behaviour of SIGCHLD: SIG_IGN means that the
* signal isn't actually ignored, but does automatic child
* reaping, while SIG_DFL is explicitly said by POSIX to force
* the signal to be ignored.
*/

-- 
Thomas
_________________________________________
linutronix competence in embedded & realtime linux
http://www.linutronix.de mail: tglx at linutronix.de



More information about the busybox mailing list