/* ================ sig_handler ================ */ static void sig_handler( int signum, siginfo_t* info, void* context ) { static bool double_fault = false; if( double_fault ) { Sys_Printf( "double fault %s, bailing out\n", strsignal( signum ) ); Posix_Exit( signum ); } double_fault = true; // NOTE: see sigaction man page, could verbose the whole siginfo_t and print human readable si_code Sys_Printf( "signal caught: %s\nsi_code %d\n", strsignal( signum ), info->si_code ); if( fatalError[ 0 ] ) { Sys_Printf( "Was in fatal error shutdown: %s\n", fatalError ); } Sys_Printf( "Trying to exit gracefully..\n" ); Posix_SetExit( signum ); common->Quit(); }
void abrt_func( mcheck_status status ) { Sys_Printf( "memory consistency failure: %s\n", mcheckstrings[ status + 1 ] ); Posix_SetExit( EXIT_FAILURE ); common->Quit(); }