mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +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
|
// register signal handler when library is loaded
|
||||||
static bool dummy = []()
|
static bool dummy = []()
|
||||||
{
|
{
|
||||||
signal(SIGABRT, ngcore_signal_handler);
|
if(getenv("NG_BACKTRACE"))
|
||||||
signal(SIGILL, ngcore_signal_handler);
|
{
|
||||||
signal(SIGSEGV, ngcore_signal_handler);
|
signal(SIGABRT, ngcore_signal_handler);
|
||||||
|
signal(SIGILL, ngcore_signal_handler);
|
||||||
|
signal(SIGSEGV, ngcore_signal_handler);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user