mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #82163 from naelstrof/master
Made signal handling more uniform during crashes.
This commit is contained in:
commit
d8ab953442
@ -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
Block a user