Made signal handling more uniform. Fixes #82102
This commit is contained in:
parent
c12d63556b
commit
b49e9c9896
|
@ -49,6 +49,10 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGFPE, SIG_DFL);
|
||||
signal(SIGILL, SIG_DFL);
|
||||
|
||||
if (OS::get_singleton() == nullptr) {
|
||||
abort();
|
||||
}
|
||||
|
@ -156,9 +160,9 @@ void CrashHandler::disable() {
|
|||
}
|
||||
|
||||
#ifdef CRASH_HANDLER_ENABLED
|
||||
signal(SIGSEGV, nullptr);
|
||||
signal(SIGFPE, nullptr);
|
||||
signal(SIGILL, nullptr);
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGFPE, SIG_DFL);
|
||||
signal(SIGILL, SIG_DFL);
|
||||
#endif
|
||||
|
||||
disabled = true;
|
||||
|
|
|
@ -72,6 +72,10 @@ static uint64_t load_address() {
|
|||
}
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGFPE, SIG_DFL);
|
||||
signal(SIGILL, SIG_DFL);
|
||||
|
||||
if (OS::get_singleton() == nullptr) {
|
||||
abort();
|
||||
}
|
||||
|
@ -186,9 +190,9 @@ void CrashHandler::disable() {
|
|||
}
|
||||
|
||||
#ifdef CRASH_HANDLER_ENABLED
|
||||
signal(SIGSEGV, nullptr);
|
||||
signal(SIGFPE, nullptr);
|
||||
signal(SIGILL, nullptr);
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGFPE, SIG_DFL);
|
||||
signal(SIGILL, SIG_DFL);
|
||||
#endif
|
||||
|
||||
disabled = true;
|
||||
|
|
Loading…
Reference in New Issue