diff options
| author | 2006-08-18 16:45:04 +0000 | |
|---|---|---|
| committer | 2006-08-18 16:45:04 +0000 | |
| commit | a62f6e211361fc36113d5bcf490d62ac37fd4417 (patch) | |
| tree | 317ef122c958ecb4f4024a299d265b294f57daa0 /src/inspircd.cpp | |
| parent | Checking if child pid still exists, if it vanishes we exit (diff) | |
| download | inspircd++-a62f6e211361fc36113d5bcf490d62ac37fd4417.tar.gz inspircd++-a62f6e211361fc36113d5bcf490d62ac37fd4417.tar.bz2 inspircd++-a62f6e211361fc36113d5bcf490d62ac37fd4417.zip | |
Correctly return false on failure to fork
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4955 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 4 |
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 (); |
