mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +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>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static void handle_crash(int sig) {
|
static void handle_crash(int sig) {
|
||||||
|
signal(SIGSEGV, SIG_DFL);
|
||||||
|
signal(SIGFPE, SIG_DFL);
|
||||||
|
signal(SIGILL, SIG_DFL);
|
||||||
|
|
||||||
if (OS::get_singleton() == nullptr) {
|
if (OS::get_singleton() == nullptr) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@ -156,9 +160,9 @@ void CrashHandler::disable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CRASH_HANDLER_ENABLED
|
#ifdef CRASH_HANDLER_ENABLED
|
||||||
signal(SIGSEGV, nullptr);
|
signal(SIGSEGV, SIG_DFL);
|
||||||
signal(SIGFPE, nullptr);
|
signal(SIGFPE, SIG_DFL);
|
||||||
signal(SIGILL, nullptr);
|
signal(SIGILL, SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
disabled = true;
|
disabled = true;
|
||||||
|
@ -72,6 +72,10 @@ static uint64_t load_address() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void handle_crash(int sig) {
|
static void handle_crash(int sig) {
|
||||||
|
signal(SIGSEGV, SIG_DFL);
|
||||||
|
signal(SIGFPE, SIG_DFL);
|
||||||
|
signal(SIGILL, SIG_DFL);
|
||||||
|
|
||||||
if (OS::get_singleton() == nullptr) {
|
if (OS::get_singleton() == nullptr) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@ -186,9 +190,9 @@ void CrashHandler::disable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CRASH_HANDLER_ENABLED
|
#ifdef CRASH_HANDLER_ENABLED
|
||||||
signal(SIGSEGV, nullptr);
|
signal(SIGSEGV, SIG_DFL);
|
||||||
signal(SIGFPE, nullptr);
|
signal(SIGFPE, SIG_DFL);
|
||||||
signal(SIGILL, nullptr);
|
signal(SIGILL, SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
disabled = true;
|
disabled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user