stop timer thread
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index b2c36fc1d23ea92292816d7982d711ff8f415053..c00cbfc509c1ff1ae7e75734d23a5cff3353ac36 100644 (file)
@@ -510,9 +510,6 @@ static void stop_threads(void)
        /* Dispatch thread */
        CMM_STORE_SHARED(dispatch_thread_exit, 1);
        futex_nto1_wake(&ust_cmd_queue.futex);
-
-       /* timer thread */
-       kill(getpid(), LTTNG_SESSIOND_SIG_EXIT);
 }
 
 /*
@@ -5739,6 +5736,11 @@ int main(int argc, char **argv)
                goto exit_set_signal_handler;
        }
 
+       if (sessiond_timer_signal_init()) {
+               retval = -1;
+               goto exit_set_signal_handler;
+       }
+
        setup_consumerd_path();
 
        page_size = sysconf(_SC_PAGESIZE);
@@ -6565,6 +6567,7 @@ exit_init_data:
        }
 
        if (timer_thread_running) {
+               kill(getpid(), LTTNG_SESSIOND_SIG_EXIT);
                ret = pthread_join(timer_thread, &status);
                if (ret) {
                        errno = ret;
This page took 0.027332 seconds and 5 git commands to generate.