Generate a coredump on quit due to SIGSEGV
This commit is contained in:
parent
e49a0d2581
commit
d2f2c3d0c7
|
@ -897,6 +897,12 @@ void signal_handler(int signal)
|
||||||
|
|
||||||
if (signal == SIGTERM)
|
if (signal == SIGTERM)
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
else if (signal == SIGSEGV)
|
||||||
|
{
|
||||||
|
// generate core dump
|
||||||
|
::signal(SIGSEGV, SIG_DFL);
|
||||||
|
kill(getpid(), SIGSEGV);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user