]> granicus.if.org Git - icinga2/commitdiff
Make sure the timer thread is gone when calling fork()
authorGunnar Beutner <gunnar@beutner.name>
Tue, 20 Oct 2015 20:55:16 +0000 (22:55 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 20 Oct 2015 21:02:11 +0000 (23:02 +0200)
refs #10410

lib/cli/daemoncommand.cpp

index 075b914749119ef28c81cc3446e99c561e30da4f..d938e20f6eda9bbb27b6349d7397829879cb3253 100644 (file)
@@ -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;