1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 19:39:41 +00:00

Add env variable to enable/disable crash catcher

This commit is contained in:
elsid 2020-04-25 00:26:42 +02:00
parent 3b9a51b8ac
commit 066f0a744f
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -555,6 +555,9 @@ static bool is_debugger_present()
void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath)
{
if (const auto env = std::getenv("OPENMW_DISABLE_CRASH_CATCHER"))
if (std::atol(env) != 0)
return;
if ((argc == 2 && strcmp(argv[1], crash_switch) == 0) || !is_debugger_present())
{
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };