diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-09-25 18:34:54 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-25 22:43:52 -0400 |
commit | 9738e8b6d91685cb08ad682b511a7eca09ca1cc4 (patch) | |
tree | d871e60dd77e8c768f8a9a0b5b6213076d4deb6f /rts/posix | |
parent | d11611f5739284cc6aab9b2636ac6485352107ea (diff) | |
download | haskell-9738e8b6d91685cb08ad682b511a7eca09ca1cc4.tar.gz |
Use SIGQUIT for DWARF backtraces instead of SIGUSR2
Reviewers: austin, erikd, simonmar
Subscribers: NicolasT, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3979
Diffstat (limited to 'rts/posix')
-rw-r--r-- | rts/posix/Signals.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 6b728905e6..e75f99def8 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -528,10 +528,10 @@ shutdown_handler(int sig STG_UNUSED) } /* ----------------------------------------------------------------------------- - * SIGUSR2 handler. + * SIGQUIT handler. * * We try to give the user an indication of what we are currently doing - * in response to SIGUSR2. + * in response to SIGQUIT. * -------------------------------------------------------------------------- */ static void backtrace_handler(int sig STG_UNUSED) @@ -539,7 +539,7 @@ backtrace_handler(int sig STG_UNUSED) #if USE_LIBDW LibdwSession *session = libdwInit(); Backtrace *bt = libdwGetBacktrace(session); - fprintf(stderr, "\nCaught SIGUSR2; Backtrace:\n"); + fprintf(stderr, "\nCaught SIGQUIT; Backtrace:\n"); libdwPrintBacktrace(session, stderr, bt); backtraceFree(bt); libdwFree(session); @@ -721,12 +721,12 @@ initDefaultHandlers(void) sysErrorBelch("warning: failed to install SIGPIPE handler"); } - // Print a backtrace on SIGUSR2 + // Print a backtrace on SIGQUIT action.sa_handler = backtrace_handler; sigemptyset(&action.sa_mask); action.sa_flags = 0; - if (sigaction(SIGUSR2, &action, &oact) != 0) { - sysErrorBelch("warning: failed to install SIGUSR2 handler"); + if (sigaction(SIGQUIT, &action, &oact) != 0) { + sysErrorBelch("warning: failed to install SIGQUIT handler"); } set_sigtstp_action(true); |