summaryrefslogtreecommitdiff
path: root/src/inspircd_io.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-28 22:30:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-28 22:30:34 +0000
commit003e9406368c9fcabaebc0711156cafd82303417 (patch)
tree91716a38b8575d016e9e870be196aba9e68ca790 /src/inspircd_io.cpp
parent25d1c9c176be31458ffc264d5b6e7ccdd8660717 (diff)
Signal handlers were not being set when -nofork was enabled
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2688 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r--src/inspircd_io.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index b0170d0a3..dd5b14692 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -404,15 +404,19 @@ void WritePID(std::string filename)
}
}
-
-int DaemonSeed (void)
+void SetSignals()
{
- int childpid;
signal (SIGALRM, SIG_IGN);
signal (SIGHUP, Rehash);
signal (SIGPIPE, SIG_IGN);
signal (SIGTERM, Exit);
signal (SIGSEGV, Error);
+}
+
+
+int DaemonSeed (void)
+{
+ int childpid;
if ((childpid = fork ()) < 0)
return (ERROR);
else if (childpid > 0)