reset signal handlers in unrecoverable

This commit is contained in:
Vaxry 2023-03-01 21:55:30 +00:00
parent 52878161e4
commit 556c7dd51f

View file

@ -20,12 +20,17 @@ int handleCritSignal(int signo, void* data) {
void handleUnrecoverableSignal(int sig) { void handleUnrecoverableSignal(int sig) {
// remove our handlers
signal(SIGABRT, SIG_DFL);
signal(SIGSEGV, SIG_DFL);
if (g_pHookSystem->m_bCurrentEventPlugin) { if (g_pHookSystem->m_bCurrentEventPlugin) {
longjmp(g_pHookSystem->m_jbHookFaultJumpBuf, 1); longjmp(g_pHookSystem->m_jbHookFaultJumpBuf, 1);
return; return;
} }
CrashReporter::createAndSaveCrash(sig); CrashReporter::createAndSaveCrash(sig);
abort(); abort();
} }