diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-26 16:23:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-26 16:23:55 +0000 |
commit | ce4a4abaf25344a2ac0f56e13770bd49ab776aed (patch) | |
tree | 87557429af9609a768ce2a8ecfae1b50828df94a /src | |
parent | 01aae0d76263d28bae3642545d7c071290d242da (diff) |
Fix bug reported by darix where inspircd process returns 15 for successful startup rather than the correct 0
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6715 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 6630cde5d..14bff2bef 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -220,6 +220,11 @@ void InspIRCd::SetSignals() signal(SIGCHLD, SIG_IGN); } +void InspIRCd::QuickExit(int status) +{ + exit(0); +} + bool InspIRCd::DaemonSeed() { int childpid; @@ -234,6 +239,7 @@ bool InspIRCd::DaemonSeed() * if the child pid is still around. If theyre not, * they threw an error and we should give up. */ + signal(SIGTERM, InspIRCd::QuickExit); while (kill(childpid, 0) != -1) sleep(1); exit(0); |