From 710cd7287f2ce3a9ee62c0c0a7df5df8e40497c5 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Wed, 21 Oct 2020 16:21:14 +0200 Subject: [PATCH] Begin crash log for SIGABRT with error message and timestamp This makes the format more similar to what the uncaught C++ and SEH exception handlers write. Previously there was no indication in the crash log that a SIGABRT happened. --- lib/base/application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 85f0b5e81..aa2bc1b2a 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -758,6 +758,10 @@ void Application::SigAbrtHandler(int) Log(LogCritical, "Application") << "Icinga 2 has terminated unexpectedly. Additional information can be found in '" << fname << "'" << "\n"; + ofs << "Caught SIGABRT." << "\n" + << "Current time: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", Utility::GetTime()) << "\n" + << "\n"; + DisplayInfoMessage(ofs); ofs << "\nStacktrace:\n" << boost::stacktrace::stacktrace() << "\n";