+++ /dev/null
-diff -ur busybox-0.60.2/init.c busybox-0.60.2-/init.c
---- busybox-0.60.2/init.c Sun Jul 28 12:45:54 2002
-+++ busybox-0.60.2-/init.c Sun Jul 28 12:43:02 2002
-@@ -898,13 +898,34 @@
- #endif /* BB_FEATURE_USE_INITTAB */
- }
-
-+static void rape_child(int sig)
-+{
-+ pid_t wpid;
-+ int status;
-+ initAction *a;
-+
-+ /* Wait for a child process to exit */
-+ wpid = wait(&status);
-+ if (wpid > 0) {
-+ /* Find out who died and clean up their corpse */
-+ for (a = initActionList; a; a = a->nextPtr) {
-+ if (a->pid == wpid) {
-+ a->pid = 0;
-+ message(LOG,
-+ "Process '%s' (pid %d) exited. Scheduling it for restart.\n",
-+ a->process, wpid);
-+ }
-+ }
-+ }
-+
-+ signal(sig, rape_child);
-+}
-+
-
-
- extern int init_main(int argc, char **argv)
- {
- initAction *a, *tmp;
-- pid_t wpid;
-- int status;
-
- #ifndef DEBUG_INIT
- /* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
-@@ -1001,6 +1022,8 @@
- loop_forever();
- }
-
-+ signal(SIGCHLD, rape_child);
-+
- /* Now run the looping stuff for the rest of forever */
- while (1) {
- for (a = initActionList; a; a = a->nextPtr) {
-@@ -1022,19 +1045,6 @@
- }
- }
- }
-- /* Wait for a child process to exit */
-- wpid = wait(&status);
-- if (wpid > 0) {
-- /* Find out who died and clean up their corpse */
-- for (a = initActionList; a; a = a->nextPtr) {
-- if (a->pid == wpid) {
-- a->pid = 0;
-- message(LOG,
-- "Process '%s' (pid %d) exited. Scheduling it for restart.\n",
-- a->process, wpid);
-- }
-- }
-- }
- sleep(1);
- }
- }