From: Michael Friedrich Date: Tue, 16 Oct 2018 09:54:14 +0000 (+0200) Subject: Add missing shutdown/program state dumps for SIGUSR2 reload handler X-Git-Tag: v2.10.1~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F6691%2Fhead;p=icinga2 Add missing shutdown/program state dumps for SIGUSR2 reload handler Credits to @west0rmann finding the issue and providing the initial fix. fixes #6689 fixes #6592 --- diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 8388e720c..1d6e1b4b1 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -751,6 +751,13 @@ void Application::SigUsr2Handler(int) instance->ClosePidFile(false); + /* Ensure to dump the program state on reload. */ + ConfigObject::StopObjects(); + instance->OnShutdown(); + + Log(LogInformation, "Application") + << "Reload done, parent process shutting down. Child process with PID '" << m_ReloadProcess << "' is taking over."; + Exit(0); }