inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit f7a5b4fa74192338012b5174748e2ce4d796d46d
parent 08d2ff86b0c7ed91549d832cf3e572c8623dc8e8
Author: Peter Powell <petpow@saberuk.com>
Date:   Thu, 30 May 2019 21:24:08 +0100

Ignore SIGUSR1 and SIGUSR2 by default.

This stops users from accidentally killing their IRC server if they
forget to load the sslrehashsignal module.

Diffstat:
Msrc/inspircd.cpp | 5+++--
Msrc/modules/extra/m_sslrehashsignal.cpp | 2+-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/inspircd.cpp b/src/inspircd.cpp @@ -121,10 +121,11 @@ void InspIRCd::SetSignals() { #ifndef _WIN32 signal(SIGALRM, SIG_IGN); + signal(SIGCHLD, SIG_IGN); signal(SIGHUP, InspIRCd::SetSignal); signal(SIGPIPE, SIG_IGN); - signal(SIGCHLD, SIG_IGN); - /* We want E2BIG not a signal! */ + signal(SIGUSR1, SIG_IGN); + signal(SIGUSR2, SIG_IGN); signal(SIGXFSZ, SIG_IGN); #endif signal(SIGTERM, InspIRCd::SetSignal); diff --git a/src/modules/extra/m_sslrehashsignal.cpp b/src/modules/extra/m_sslrehashsignal.cpp @@ -33,7 +33,7 @@ class ModuleSSLRehashSignal : public Module public: ~ModuleSSLRehashSignal() { - signal(SIGUSR1, SIG_DFL); + signal(SIGUSR1, SIG_IGN); } void init()