Skip to content

Commit

Permalink
Make SIGSEGV and SIGABRT handle cleanly and THEN coredump
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed May 2, 2012
1 parent baee9ac commit a22afa3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mythtv/libs/libmythbase/signalhandling.cpp
Expand Up @@ -140,11 +140,15 @@ void SignalHandler::handleSignal(void)
break; break;
case SIGSEGV: case SIGSEGV:
LOG(VB_GENERAL, LOG_CRIT, "Received SIGSEGV"); LOG(VB_GENERAL, LOG_CRIT, "Received SIGSEGV");
qApp->quit(); signal(SIGSEGV, SIG_DFL);
usleep(100000);
raise(signum);
break; break;
case SIGABRT: case SIGABRT:
LOG(VB_GENERAL, LOG_CRIT, "Received SIGABRT"); LOG(VB_GENERAL, LOG_CRIT, "Received SIGABRT");
qApp->quit(); signal(SIGABRT, SIG_DFL);
usleep(100000);
raise(signum);
break; break;
case SIGUSR1: case SIGUSR1:
LOG(VB_GENERAL, LOG_CRIT, "Received SIGUSR1"); LOG(VB_GENERAL, LOG_CRIT, "Received SIGUSR1");
Expand Down

0 comments on commit a22afa3

Please sign in to comment.