[BusyBox-cvs] busybox.stable init.c,1.180,1.181
Erik Andersen
andersen at busybox.net
Sat Jul 26 06:25:18 UTC 2003
Update of /var/cvs/busybox.stable
In directory winder:/tmp/cvs-serv9046
Modified Files:
init.c
Log Message:
Patch from Thomas Gleixner to reap any zombie processes that are
reparented to init...
Index: init.c
===================================================================
RCS file: /var/cvs/busybox.stable/init.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- init.c 5 Jul 2003 08:39:47 -0000 1.180
+++ init.c 26 Jul 2003 06:25:12 -0000 1.181
@@ -872,6 +872,13 @@
got_cont = 1;
}
+/* Reap any zombie processes that are reparented to init */
+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)
@@ -1081,6 +1088,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... */
More information about the busybox-cvs
mailing list