mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 17:09:40 +00:00
Add env variable to enable/disable crash catcher
This commit is contained in:
parent
3b9a51b8ac
commit
066f0a744f
1 changed files with 3 additions and 0 deletions
|
@ -555,6 +555,9 @@ static bool is_debugger_present()
|
||||||
|
|
||||||
void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath)
|
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())
|
if ((argc == 2 && strcmp(argv[1], crash_switch) == 0) || !is_debugger_present())
|
||||||
{
|
{
|
||||||
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
||||||
|
|
Loading…
Reference in a new issue