try to generate a core dump signaling again the thread

SQLiteServer
René Cannaò 10 years ago
parent 396332edf1
commit 57b4512040

@ -23,6 +23,13 @@ void crash_handler(int sig) {
fprintf(stderr, "Error: signal %d:\n", sig);
backtrace_symbols_fd(arr, s, STDERR_FILENO);
#ifdef SYS_gettid
// try to generate a core dump signaling again the thread
signal(sig, SIG_DFL);
pid_t tid;
tid = syscall(SYS_gettid);
kill(tid, sig);
#endif /* SYS_gettid */
exit(EXIT_FAILURE);
}

Loading…
Cancel
Save