summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChrisTX <xpipe@hotmail.de>2013-09-04 14:16:48 +0200
committerattilamolnar <attilamolnar@hush.com>2013-09-08 12:10:01 +0200
commit3f4d54eb031f1cd6b016dfe1f768ed86303e3856 (patch)
tree194c78243eb190c22328b351edf226ef93358b29 /include
parentfb1e17c31cfb4af8f7512a0e6c7d7da81ae1be55 (diff)
Fix a crash when running as systemd service
- Fix a NULL dereference if a signal is raised in the constructor of the class InspIRCd - Resolve the parent's process exit code being SIGTERM=15 and typically not EXIT_SUCCESS thus A combination of the two caused crashes when running as systemd unit.
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 86853a94f..d5e749193 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -47,6 +47,7 @@
#endif
// Required system headers.
+#include <csignal>
#include <ctime>
#include <cstdarg>
#include <algorithm>
@@ -454,7 +455,7 @@ class CoreExport InspIRCd
/** Set to the current signal recieved
*/
- int s_signal;
+ static sig_atomic_t s_signal;
/** Protocol interface, overridden by server protocol modules
*/