1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

Generate a coredump on quit due to SIGSEGV

This commit is contained in:
Maxime Coste 2018-12-13 21:29:33 +11:00
parent e49a0d2581
commit d2f2c3d0c7

View File

@ -897,6 +897,12 @@ void signal_handler(int signal)
if (signal == SIGTERM)
exit(-1);
else if (signal == SIGSEGV)
{
// generate core dump
::signal(SIGSEGV, SIG_DFL);
kill(getpid(), SIGSEGV);
}
else
abort();
}