From 5557e53f231b47f3415f690fbc0d18329937321f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Bourlet?= Date: Wed, 15 Mar 2017 17:01:35 -0700 Subject: [PATCH] Only catch signals with a default action of "Core" Close #59 --- backward.hpp | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/backward.hpp b/backward.hpp index 2bf5834..04f7843 100644 --- a/backward.hpp +++ b/backward.hpp @@ -1869,33 +1869,20 @@ class SignalHandling { public: static std::vector make_default_signals() { const int posix_signals[] = { - // default action: Core - SIGILL, - SIGABRT, - SIGFPE, - SIGSEGV, - SIGBUS, - // I am not sure the following signals should be enabled by - // default: - // default action: Term - SIGHUP, - SIGINT, - SIGPIPE, - SIGALRM, - SIGTERM, - SIGUSR1, - SIGUSR2, - SIGPOLL, - SIGPROF, - SIGVTALRM, - SIGIO, - SIGPWR, - // default action: Core - SIGQUIT, - SIGSYS, - SIGTRAP, - SIGXCPU, - SIGXFSZ + // Signals for which the default action is "Core". + SIGABRT, // Abort signal from abort(3) + SIGBUS, // Bus error (bad memory access) + SIGFPE, // Floating point exception + SIGILL, // Illegal Instruction + SIGIOT, // IOT trap. A synonym for SIGABRT + SIGQUIT, // Quit from keyboard + SIGSEGV, // Invalid memory reference + SIGSYS, // Bad argument to routine (SVr4) + SIGTRAP, // Trace/breakpoint trap + SIGUNUSED, // Synonymous with SIGSYS + SIGXCPU, // CPU time limit exceeded (4.2BSD) + SIGXFSZ, // File size limit exceeded (4.2BSD) + }; return std::vector(posix_signals, posix_signals + sizeof posix_signals / sizeof posix_signals[0] ); }