mirror of
https://github.com/znc/znc.git
synced 2026-08-05 08:23:12 +02:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user