[BusyBox] BusyBox 1.0.0-pre1

Thomas Gleixner tglx at linutronix.de
Wed Jul 16 22:45:09 UTC 2003


Hi all,

I was surprised to find an old problem in the pre1 release again. 
See the nearby 1 year old message below. 
This patch was included into the CVS code by Vladimir some weeks later. I have 
some CVS snapshots, where this was fixed. But with pre1 I encounter an 1 year 
old problem again. I modified the pre1 code accoording to the patch below and 
got rid of my problems. 
Any thoughts ?

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


Subject: [BusyBox] Init
Date: Friday 23 August 2002 20:11
From: Thomas Gleixner <tglx at linutronix.de>
To: busybox at busybox.net

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.

--
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	Fri Aug 23 19:53:52 2002
@@ -837,6 +837,11 @@
 	got_cont = 1;
 }

+static void child_handler (int sig)
+{
+	int status;
+	while ( wait3(&status, WNOHANG, NULL) > 0 );
+}
 #endif							/* ! DEBUG_INIT */

 static void new_init_action(int action, char *command, char *cons)
@@ -1055,6 +1060,7 @@
 	signal(SIGCONT, cont_handler);
 	signal(SIGSTOP, stop_handler);
 	signal(SIGTSTP, stop_handler);
+	signal(SIGCHLD, child_handler);

 	/* Turn off rebooting via CTL-ALT-DEL -- we get a
 	 * SIGINT on CAD so we can shut things down gracefully... */

_______________________________________________
busybox mailing list
busybox at busybox.net
http://busybox.net/mailman/listinfo/busybox

-------------------------------------------------------




More information about the busybox mailing list