From a62f6e211361fc36113d5bcf490d62ac37fd4417 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 18 Aug 2006 16:45:04 +0000 Subject: Correctly return false on failure to fork git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4955 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e8e93bcc5..c022b0bb9 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -118,7 +118,7 @@ bool InspIRCd::DaemonSeed() { int childpid; if ((childpid = fork ()) < 0) - return (ERROR); + return false; else if (childpid > 0) { /* We wait here for the child process to kill us, @@ -129,9 +129,7 @@ bool InspIRCd::DaemonSeed() * they threw an error and we should give up. */ while (kill(childpid, 0) != -1) - { sleep(1); - } exit(ERROR); } setsid (); -- cgit v1.2.3