X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=9d0d01f14662bee7b023eb0c621c431d651c3add;hb=9edd46e75ba795a85233a518f8dbbf203710a89b;hp=b3832e19c67855cd9b4477f1c853a2d2bf90a9c5;hpb=ecc48a904cc7c419fd1400afaa9ccb93be490cdd;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index b3832e19c..9d0d01f14 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4774,7 +4774,7 @@ int main(int argc, char **argv) ust_thread_manage_notify, (void *) NULL); if (ret != 0) { PERROR("pthread_create apps"); - goto exit_apps; + goto exit_apps_notify; } /* Don't start this thread if kernel tracing is not requested nor root */ @@ -4795,12 +4795,20 @@ int main(int argc, char **argv) } exit_kernel: + ret = pthread_join(apps_notify_thread, &status); + if (ret != 0) { + PERROR("pthread_join apps notify"); + goto error; /* join error, exit without cleanup */ + } + +exit_apps_notify: ret = pthread_join(apps_thread, &status); if (ret != 0) { - PERROR("pthread_join"); + PERROR("pthread_join apps"); goto error; /* join error, exit without cleanup */ } + exit_apps: ret = pthread_join(reg_apps_thread, &status); if (ret != 0) {