X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-consumerd%2Flttng-consumerd.c;h=9fb4747536ad7fb3551217f1f3d6aaa0198caae6;hp=7f78c4ec2b0971fcfa249a3c35f7c953bd5a8d39;hb=e9404c27e7cc9d841785e6c4292c1add19fbc1cc;hpb=4d62fbf82e90a66f7196331bf515f58e63801d35 diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index 7f78c4ec2..9fb474753 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -308,6 +308,8 @@ int main(int argc, char **argv) void *status; struct lttng_consumer_local_data *tmp_ctx; + rcu_register_thread(); + if (set_signal_handler()) { retval = -1; goto exit_set_signal_handler; @@ -536,7 +538,7 @@ int main(int argc, char **argv) goto exit_data_thread; } - /* Create the thread to manage the receive of fd */ + /* Create the thread to manage the reception of fds */ ret = pthread_create(&sessiond_thread, default_pthread_attr(), consumer_thread_sessiond_poll, (void *) ctx); @@ -581,6 +583,14 @@ exit_metadata_timer_thread: PERROR("pthread_join sessiond_thread"); retval = -1; } + + ret = consumer_timer_thread_get_channel_monitor_pipe(); + if (ret >= 0) { + ret = close(ret); + if (ret) { + PERROR("close channel monitor pipe"); + } + } exit_sessiond_thread: ret = pthread_join(data_thread, &status); @@ -643,6 +653,8 @@ exit_health_consumerd_cleanup: exit_options: exit_set_signal_handler: + rcu_unregister_thread(); + if (!retval) { exit(EXIT_SUCCESS); } else {