Skip to content

Commit

Permalink
Also add crash info on SIGABRT
Browse files Browse the repository at this point in the history
  • Loading branch information
nviennot committed Nov 7, 2019
1 parent 0272757 commit 1600a81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tmate-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void tmate_print_stack_trace(void)
}


static void handle_sigsegv(__unused int sig)
static void handle_crash(__unused int sig)
{
/* TODO send stack trace to server */
tmate_info("CRASH, printing stack trace");
Expand All @@ -95,6 +95,7 @@ static void handle_sigsegv(__unused int sig)

void tmate_catch_sigsegv(void)
{
signal(SIGSEGV, handle_sigsegv);
signal(SIGSEGV, handle_crash);
signal(SIGABRT, handle_crash);
}
#endif

0 comments on commit 1600a81

Please sign in to comment.