From: Gunnar Beutner Date: Tue, 20 Oct 2015 20:55:16 +0000 (+0200) Subject: Make sure the timer thread is gone when calling fork() X-Git-Tag: v2.4.0~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c6f0e31d9177bf0736ad247df0bb3bf0696e969;p=icinga2 Make sure the timer thread is gone when calling fork() refs #10410 --- diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index 075b91474..d938e20f6 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -53,7 +53,7 @@ static void SigHupHandler(int) static bool Daemonize(void) { #ifndef _WIN32 - Application::GetTP().Stop(); + Application::UninitializeBase(); pid_t pid = fork(); if (pid == -1) { @@ -86,7 +86,7 @@ static bool Daemonize(void) _exit(EXIT_SUCCESS); } - Application::GetTP().Start(); + Application::InitializeBase(); #endif /* _WIN32 */ return true;