X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=d6bc015981d96246f3ef71dd98c0dea9bc3403b3;hp=1fbfb1b0549383cd77e5334aad25338320cb6d56;hb=4a91420cefb94afc4a20042bdbe2564086dad3cb;hpb=4ec029ed8d032ac98d8dc158a751841b7c150639;ds=sidebyside diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 1fbfb1b05..d6bc01598 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1353,6 +1353,7 @@ int main(int argc, char **argv) /* Queue of rotation jobs populated by the sessiond-timer. */ struct rotation_thread_timer_queue *rotation_timer_queue = NULL; struct lttng_thread *client_thread = NULL; + struct lttng_thread *notification_thread = NULL; init_kernel_workarounds(); @@ -1702,7 +1703,9 @@ int main(int argc, char **argv) } /* Create notification thread. */ - if (!launch_notification_thread(notification_thread_handle)) { + notification_thread = launch_notification_thread( + notification_thread_handle); + if (!notification_thread) { retval = -1; goto exit_notification; } @@ -1837,6 +1840,11 @@ exit_init_data: rcu_thread_online(); sessiond_cleanup(); + if (notification_thread) { + lttng_thread_shutdown(notification_thread); + lttng_thread_put(notification_thread); + } + /* * Ensure all prior call_rcu are done. call_rcu callbacks may push * hash tables to the ht_cleanup thread. Therefore, we ensure that