From 1600a81e589e92f3e7bd68a34645797909a32b9a Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Wed, 6 Nov 2019 20:34:44 -0500 Subject: [PATCH] Also add crash info on SIGABRT --- tmate-debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tmate-debug.c b/tmate-debug.c index f58efe0e..59e8fe7d 100644 --- a/tmate-debug.c +++ b/tmate-debug.c @@ -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"); @@ -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