mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-22 16:13:58 +01:00
Better crash messages
This commit is contained in:
parent
2b86031308
commit
86ec8d1ad6
@ -88,9 +88,13 @@ void tmate_print_stack_trace(void)
|
|||||||
static void handle_crash(__unused int sig)
|
static void handle_crash(__unused int sig)
|
||||||
{
|
{
|
||||||
/* TODO send stack trace to server */
|
/* TODO send stack trace to server */
|
||||||
tmate_info("CRASH, printing stack trace");
|
const char *what = sig == SIGSEGV ? "SIGSEGV" : "SIGABRT";
|
||||||
|
tmate_info("%s printing stack trace", what);
|
||||||
tmate_print_stack_trace();
|
tmate_print_stack_trace();
|
||||||
tmate_fatal("CRASHED");
|
|
||||||
|
/* Reraise */
|
||||||
|
signal(sig, NULL);
|
||||||
|
kill(getpid(), sig);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tmate_catch_sigsegv(void)
|
void tmate_catch_sigsegv(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user