From b856ae9bf35206a324bcbd377a50cf2c5e7eb3b4 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 18 Dec 2009 17:04:50 +0000 Subject: [PATCH] Don't try to catch SIGILL, SIGBUS or SIGSEGV The signal handler didn't really do anything useful for these signals and if znc gets one of these signals, something is really fishy and we shouldn't even try to do a clean shutdown. The default behavior for these signals is now used instead which means you can get core dumps. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1680 726aef4b-f618-498e-8847-2d620e286838 --- main.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/main.cpp b/main.cpp index ba699a01..ac826657 100644 --- a/main.cpp +++ b/main.cpp @@ -47,11 +47,6 @@ static void die(int sig) { signal(SIGPIPE, SIG_DFL); CUtils::PrintMessage("Exiting on SIG [" + CString(sig) + "]"); -#ifdef _DEBUG - if ((sig == SIGABRT) || (sig == SIGSEGV)) { - abort(); - } -#endif /* _DEBUG */ delete &CZNC::Get(); exit(sig); @@ -259,10 +254,7 @@ int main(int argc, char** argv) { sa.sa_flags = SA_RESETHAND; sa.sa_handler = die; sigaction(SIGINT, &sa, (struct sigaction*) NULL); - sigaction(SIGILL, &sa, (struct sigaction*) NULL); sigaction(SIGQUIT, &sa, (struct sigaction*) NULL); - sigaction(SIGBUS, &sa, (struct sigaction*) NULL); - sigaction(SIGSEGV, &sa, (struct sigaction*) NULL); sigaction(SIGTERM, &sa, (struct sigaction*) NULL); int iRet = 0;