mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Better crash messages
This commit is contained in:
parent
2b86031308
commit
86ec8d1ad6
1 changed files with 6 additions and 2 deletions
|
|
@ -88,9 +88,13 @@ void tmate_print_stack_trace(void)
|
|||
static void handle_crash(__unused int sig)
|
||||
{
|
||||
/* 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_fatal("CRASHED");
|
||||
|
||||
/* Reraise */
|
||||
signal(sig, NULL);
|
||||
kill(getpid(), sig);
|
||||
}
|
||||
|
||||
void tmate_catch_sigsegv(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue