mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
set signal handlers only if NG_BACKTRACE is set
This commit is contained in:
parent
7058732e23
commit
e17aa88cad
@ -217,9 +217,12 @@ static void ngcore_signal_handler(int sig)
|
||||
// register signal handler when library is loaded
|
||||
static bool dummy = []()
|
||||
{
|
||||
signal(SIGABRT, ngcore_signal_handler);
|
||||
signal(SIGILL, ngcore_signal_handler);
|
||||
signal(SIGSEGV, ngcore_signal_handler);
|
||||
if(getenv("NG_BACKTRACE"))
|
||||
{
|
||||
signal(SIGABRT, ngcore_signal_handler);
|
||||
signal(SIGILL, ngcore_signal_handler);
|
||||
signal(SIGSEGV, ngcore_signal_handler);
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user