Skip to content

Commit

Permalink
implement safe backtrace print and exit upon SIGQUIT
Browse files Browse the repository at this point in the history
  • Loading branch information
MicJagger committed Jun 18, 2024
1 parent 3a19267 commit 4268379
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <stdlib.h>
#include <unistd.h>

#include "roc_core/backtrace.h"
#include "roc_core/crash_handler.h"
#include "roc_core/die.h"
#include "roc_core/errno_to_str.h"
Expand All @@ -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";
Expand Down

0 comments on commit 4268379

Please sign in to comment.