static void _sig_term(int sig) { int rc = signal_term(sig); // NOTE: special error signal if ((sig == SIGFPE || sig == SIGILL || sig == SIGSEGV || sig == SIGBUS) && signal(sig, SIG_DFL) != SIG_ERR) { // restore to SIG_DFL to dump core file raise(sig); return; } // exit or not if (rc != SIGNAL_TERM_LATER) exit(rc); }
static void _sig_term(int sig) { int rc = signal_term(sig); #ifdef DEBUG // NOTE: generate core file in DEBUG mode if ((sig == SIGFPE || sig == SIGILL || sig == SIGBUS || sig == SIGSEGV || sig == SIGABRT) && signal(sig, SIG_DFL) != SIG_ERR) { raise(sig); return; } #endif // exit or not if (rc != SIGNAL_TERM_LATER) _exit(rc); }
static void _sig_term(int sig) { int rc = signal_term(sig); #if 0 // hightman.130115: due to block here // NOTE: special error signal if ((sig == SIGFPE || sig == SIGILL || sig == SIGSEGV || sig == SIGBUS) && signal(sig, SIG_DFL) != SIG_ERR) { // restore to SIG_DFL to dump core file raise(sig); return; } #endif // exit or not if (rc != SIGNAL_TERM_LATER) exit(rc); }