summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-04-12 19:17:13 +0000
committerEric Andersen <andersen@codepoet.org>2004-04-12 19:17:13 +0000
commit4e19fa9b644065c112da3472ab6ce3a938cc1ac8 (patch)
treea70587fa0e8d409e5ee99e8e3a2b3d804f01f02f /init/init.c
parent1e6aba967ce2e1225e7ed566e5b83cbfb117b6b4 (diff)
downloadbusybox-w32-4e19fa9b644065c112da3472ab6ce3a938cc1ac8.tar.gz
busybox-w32-4e19fa9b644065c112da3472ab6ce3a938cc1ac8.tar.bz2
busybox-w32-4e19fa9b644065c112da3472ab6ce3a938cc1ac8.zip
As reported by Quy Tonthat, init has problems with inittab's that
contain only actions sysinit/wait/once. It does not clean up zombies in that case.
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/init/init.c b/init/init.c
index ae2fd4c3a..fd1443e44 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1144,13 +1144,6 @@ extern int init_main(int argc, char **argv)
1144 /* Next run anything to be run only once */ 1144 /* Next run anything to be run only once */
1145 run_actions(ONCE); 1145 run_actions(ONCE);
1146 1146
1147 /* If there is nothing else to do, stop */
1148 if (init_action_list == NULL) {
1149 message(LOG | CONSOLE,
1150 "No more tasks for init -- sleeping forever.");
1151 loop_forever();
1152 }
1153
1154 /* Redefine SIGHUP to reread /etc/inittab */ 1147 /* Redefine SIGHUP to reread /etc/inittab */
1155 signal(SIGHUP, reload_signal); 1148 signal(SIGHUP, reload_signal);
1156 1149
@@ -1167,7 +1160,7 @@ extern int init_main(int argc, char **argv)
1167 1160
1168 /* Wait for a child process to exit */ 1161 /* Wait for a child process to exit */
1169 wpid = wait(&status); 1162 wpid = wait(&status);
1170 while (wpid > 0) { 1163 while (init_action_list && wpid > 0) {
1171 /* Find out who died and clean up their corpse */ 1164 /* Find out who died and clean up their corpse */
1172 for (a = init_action_list; a; a = a->next) { 1165 for (a = init_action_list; a; a = a->next) {
1173 if (a->pid == wpid) { 1166 if (a->pid == wpid) {