aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index 4b543a44f..9891087f5 100644
--- a/init/init.c
+++ b/init/init.c
@@ -370,13 +370,12 @@ static pid_t run(const struct init_action *a)
370 370
371 /* Now fork off another process to just hang around */ 371 /* Now fork off another process to just hang around */
372 pid = fork(); 372 pid = fork();
373 if (pid) { 373 if (pid < 0) {
374 message(L_LOG | L_CONSOLE, "Can't fork"); 374 message(L_LOG | L_CONSOLE, "Can't fork");
375 _exit(1); 375 _exit(1);
376 } 376 }
377 377
378 if (pid > 0) { 378 if (pid > 0) {
379
380 /* We are the parent -- wait till the child is done */ 379 /* We are the parent -- wait till the child is done */
381 signal(SIGINT, SIG_IGN); 380 signal(SIGINT, SIG_IGN);
382 signal(SIGTSTP, SIG_IGN); 381 signal(SIGTSTP, SIG_IGN);