svn commit: trunk/busybox/init
vda at busybox.net
vda at busybox.net
Fri Nov 9 17:57:36 PST 2007
Author: vda
Date: 2007-11-09 17:57:35 -0800 (Fri, 09 Nov 2007)
New Revision: 20402
Log:
init: fix bug 1584: improper check for fork error
Modified:
trunk/busybox/init/init.c
Changeset:
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c 2007-11-10 01:45:03 UTC (rev 20401)
+++ trunk/busybox/init/init.c 2007-11-10 01:57:35 UTC (rev 20402)
@@ -370,13 +370,12 @@
/* 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);
More information about the busybox-cvs
mailing list