1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-16 16:20:53 +00:00

Merge pull request #2803 from elsid/disable_crash_catcher_env

Add env variable to disable crash catcher
This commit is contained in:
Bret Curtis 2020-05-04 17:09:24 +02:00 committed by GitHub
commit 34181b9ae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 };