From 42683793511695237ec1a55e244032249d157272 Mon Sep 17 00:00:00 2001 From: MicJagger Date: Tue, 18 Jun 2024 00:49:04 -0500 Subject: [PATCH] implement safe backtrace print and exit upon SIGQUIT --- .../roc_core/target_posix/roc_core/crash_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/internal_modules/roc_core/target_posix/roc_core/crash_handler.cpp b/src/internal_modules/roc_core/target_posix/roc_core/crash_handler.cpp index 16a17839a..a86c003fb 100644 --- a/src/internal_modules/roc_core/target_posix/roc_core/crash_handler.cpp +++ b/src/internal_modules/roc_core/target_posix/roc_core/crash_handler.cpp @@ -10,6 +10,7 @@ #include #include +#include "roc_core/backtrace.h" #include "roc_core/crash_handler.h" #include "roc_core/die.h" #include "roc_core/errno_to_str.h" @@ -29,6 +30,9 @@ const char* signal_string(int sig, siginfo_t* si) { return "caught SIGSEGV"; case SIGILL: return "caught SIGILL"; + case SIGQUIT: + print_backtrace_safe(); + _exit(SIGQUIT); #ifdef SIGBUS case SIGBUS: return "caught SIGBUS";