projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cc6459
)
init: fix bug 1584: improper check for fork error
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 10 Nov 2007 01:57:35 +0000
(
01:57
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 10 Nov 2007 01:57:35 +0000
(
01:57
-0000)
init/init.c
patch
|
blob
|
history
diff --git
a/init/init.c
b/init/init.c
index 4b543a44f11589115c7a97a82761d6ec83ba07ea..9891087f54e25a9d9cd70079c00543adde0093ec 100644
(file)
--- a/
init/init.c
+++ b/
init/init.c
@@
-370,13
+370,12
@@
static pid_t run(const struct init_action *a)
/* Now fork off another process to just hang around */
pid = fork();
- if (pid) {
+ if (pid
< 0
) {
message(L_LOG | L_CONSOLE, "Can't fork");
_exit(1);
}
if (pid > 0) {
-
/* We are the parent -- wait till the child is done */
signal(SIGINT, SIG_IGN);
signal(SIGTSTP, SIG_IGN);