[BusyBox] Init

Thomas Gleixner tglx at linutronix.de
Sat Aug 24 04:38:03 UTC 2002


On Fri, 2002-08-23 at 20:11, Thomas Gleixner wrote:
> Hi !
> 
> Running thttpd on my embedded system, which uses Busybox for almost
> everything including init, I ran into trouble, when I had high traffic
> with a lot of CGI processing. As traffic increased, there were a lot of
> zombie processes with PPID 1. Looking at the source, I found, that
> there's no handler for SIGCHLD in init. Has this an particular reason ?
> All other init implementations i know have one. I added one and this
> problem vanished at once. 
I figured out, that a simple signal (SIGCHLD, SIG_IGN) does the same.
The above problem applies also for orphaned threads, which have PPID 1
too. The kernel removes the zombies from the process list from time to
time, but not fast enough, if you have a lot of them.

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

--- 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... */




More information about the busybox mailing list