From a4c67f338d61bf5aaec3ac5cab4371697deaa2b4 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Thu, 12 Dec 2013 13:46:01 -0800 Subject: [PATCH] fix callPreviousSignalHandler() Summary: If a previous handler was found, the code was missing the step of actually re-raising the handler after restoring the old handler. Test Plan: Verified that our service actually exits after receiving SIGTERM. Reviewed By: tudorb@fb.com FB internal diff: D1096360 --- folly/experimental/symbolizer/SignalHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/folly/experimental/symbolizer/SignalHandler.cpp b/folly/experimental/symbolizer/SignalHandler.cpp index 5eb01405..d19cc973 100644 --- a/folly/experimental/symbolizer/SignalHandler.cpp +++ b/folly/experimental/symbolizer/SignalHandler.cpp @@ -110,6 +110,7 @@ void callPreviousSignalHandler(int signum) { for (auto p = kFatalSignals; p->name; ++p) { if (p->number == signum) { sigaction(signum, &p->oldAction, nullptr); + raise(signum); return; } } -- 2.34.1