X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=a96dc51952eb6ef84f127c027499795cfefcda76;hb=bd9addf713e7dc8fc47499f62312966a3a5f4d46;hp=5f7600c0c0b200f4608903e4c2bd1069f105ea82;hpb=f9d2ba6ae32397fd818279ea90d3691c60f0e079;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 5f7600c0c..a96dc5195 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1354,6 +1354,7 @@ int main(int argc, char **argv) struct rotation_thread_timer_queue *rotation_timer_queue = NULL; struct lttng_thread *client_thread = NULL; struct lttng_thread *notification_thread = NULL; + struct lttng_thread *register_apps_thread = NULL; init_kernel_workarounds(); @@ -1747,7 +1748,9 @@ int main(int argc, char **argv) } /* Create thread to manage application registration. */ - if (!launch_application_registration_thread(&ust_cmd_queue)) { + register_apps_thread = launch_application_registration_thread( + &ust_cmd_queue); + if (!register_apps_thread) { retval = -1; goto exit_reg_apps; } @@ -1815,6 +1818,10 @@ exit_kernel: exit_agent_reg: exit_apps_notify: exit_apps: + if (register_apps_thread) { + lttng_thread_shutdown(register_apps_thread); + lttng_thread_put(register_apps_thread); + } exit_reg_apps: exit_dispatch: exit_client: