Merge pull request #6691 from Icinga/bugfix/reload-signal-handler-dump-state-file

Add missing shutdown/program state dumps for SIGUSR2 reload handler
This commit is contained in:
Michael Friedrich 2018-10-16 14:05:17 +02:00 committed by GitHub
commit c0398ed9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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);
}