summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 16:45:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 16:45:04 +0000
commita62f6e211361fc36113d5bcf490d62ac37fd4417 (patch)
tree317ef122c958ecb4f4024a299d265b294f57daa0
parent521493c0f1675b7ee408aa2dd846f49ba1a3f4e2 (diff)
Correctly return false on failure to fork
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4955 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp4
1 files changed, 1 insertions, 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 ();