← Commit list

c58dbf28e

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-05-30
SOURCE BUG Duration: 32s

Subject

- 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

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

init/init.c+2 -3
@@ -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);
}
}
}