From 9563b0adcfa7d982efe7a1ff535a70d2961e3cf7 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 30 Sep 2013 16:24:48 -0400 Subject: [PATCH] Fix: add missing pthread_join in sessiond Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index b3832e19c..3df9216b0 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,9 +4795,16 @@ 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 */ } -- 2.34.1