mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
Avoid recursive call of signal handler
This commit is contained in:
parent
c9e764a32f
commit
c2e658274a
@ -167,6 +167,11 @@ namespace ngcore
|
|||||||
|
|
||||||
static void ngcore_signal_handler(int sig)
|
static void ngcore_signal_handler(int sig)
|
||||||
{
|
{
|
||||||
|
static bool first_call = true;
|
||||||
|
if(!first_call)
|
||||||
|
exit(1); // avoid endless recursions if signals are caused by this handler
|
||||||
|
first_call = false;
|
||||||
|
|
||||||
switch(sig)
|
switch(sig)
|
||||||
{
|
{
|
||||||
case SIGABRT:
|
case SIGABRT:
|
||||||
|
Loading…
Reference in New Issue
Block a user