aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index 9cbe8189a..b17ebc2ce 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1005,7 +1005,6 @@ int init_main(int argc, char **argv)
1005{ 1005{
1006 struct init_action *a; 1006 struct init_action *a;
1007 pid_t wpid; 1007 pid_t wpid;
1008 int status;
1009 1008
1010 if (argc > 1 && !strcmp(argv[1], "-q")) { 1009 if (argc > 1 && !strcmp(argv[1], "-q")) {
1011 return kill(1,SIGHUP); 1010 return kill(1,SIGHUP);
@@ -1139,7 +1138,7 @@ int init_main(int argc, char **argv)
1139 sleep(1); 1138 sleep(1);
1140 1139
1141 /* Wait for a child process to exit */ 1140 /* Wait for a child process to exit */
1142 wpid = wait(&status); 1141 wpid = wait(NULL);
1143 while (wpid > 0) { 1142 while (wpid > 0) {
1144 /* Find out who died and clean up their corpse */ 1143 /* Find out who died and clean up their corpse */
1145 for (a = init_action_list; a; a = a->next) { 1144 for (a = init_action_list; a; a = a->next) {
@@ -1153,7 +1152,7 @@ int init_main(int argc, char **argv)
1153 } 1152 }
1154 } 1153 }
1155 /* see if anyone else is waiting to be reaped */ 1154 /* see if anyone else is waiting to be reaped */
1156 wpid = waitpid (-1, &status, WNOHANG); 1155 wpid = waitpid (-1, NULL, WNOHANG);
1157 } 1156 }
1158 } 1157 }
1159} 1158}