From 3f4d54eb031f1cd6b016dfe1f768ed86303e3856 Mon Sep 17 00:00:00 2001 From: ChrisTX Date: Wed, 4 Sep 2013 14:16:48 +0200 Subject: 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. --- include/inspircd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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 #include #include #include @@ -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 */ -- cgit v1.2.3