aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-30 12:16:54 +0000
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-30 12:16:54 +0000
commitc58dbf28e06b68a852028663b342eca98e739ab5 (patch)
tree5723f3087eb5acc5ee759cd125d97c7d64f7ddca /init
parent3ab3080bc2c52216b5f4fb2ffbef74ec5e6c1d86 (diff)
downloadbusybox-c58dbf28e06b68a852028663b342eca98e739ab5.tar.gz
busybox-c58dbf28e06b68a852028663b342eca98e739ab5.tar.bz2
- remove useless variable "status" from init_main.
http://www.opengroup.org/onlinepubs/009695399/functions/waitpid.html suggests that we need not specify a status if we don't want, and we don't. "If wait() or waitpid() return because the status of a child process is available, these functions shall return a value equal to the process ID of the child process. In this case, if the value of the argument stat_loc is not a null pointer, information shall be stored in the location pointed to by stat_loc. " text data bss dec hex filename 5391 32 8 5431 1537 init/init.o.06 5379 32 8 5419 152b init/init.o
Diffstat (limited to 'init')
-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)
{
struct init_action *a;
pid_t wpid;
- int status;
if (argc > 1 && !strcmp(argv[1], "-q")) {
return kill(1,SIGHUP);
@@ -1139,7 +1138,7 @@ int init_main(int argc, char **argv)
sleep(1);
/* Wait for a child process to exit */
- wpid = wait(&status);
+ wpid = wait(NULL);
while (wpid > 0) {
/* Find out who died and clean up their corpse */
for (a = init_action_list; a; a = a->next) {
@@ -1153,7 +1152,7 @@ int init_main(int argc, char **argv)
}
}
/* see if anyone else is waiting to be reaped */
- wpid = waitpid (-1, &status, WNOHANG);
+ wpid = waitpid (-1, NULL, WNOHANG);
}
}
}