From 98637c521922fb2a934331a4bd01db81fcf3d3dd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 28 May 2015 13:44:59 +0100 Subject: [PATCH] Do not throw exceptions when handling a fatal signal --- src/main.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index cbd9f8df2..6e389c677 100644 --- a/src/main.cc +++ b/src/main.cc @@ -282,7 +282,11 @@ void signal_handler(int signal) case SIGPIPE: text = "SIGPIPE"; break; } if (signal != SIGTERM) - on_assert_failed(text); + { + char* callstack = Backtrace{}.desc(); + write_stderr(format("Received {}, exiting.\nCallstack:\n{}", text, callstack)); + free(callstack); + } if (Server::has_instance()) Server::instance().close_session();