From af6c8a1f50aa06c07d58e2cb00cf93f010405f6b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 16 Oct 2018 11:54:14 +0200 Subject: [PATCH] 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 --- lib/base/application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.40.0