[lttng-dev] [RFC PATCH v2 03/13] Terminate dispatch thread after reg_apps_thread is terminated
Jonathan Rajotte
jonathan.rajotte-julien at efficios.com
Mon Sep 18 22:51:56 UTC 2017
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
src/bin/lttng-sessiond/main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
index 45c0270e..0ca72ec8 100644
--- a/src/bin/lttng-sessiond/main.c
+++ b/src/bin/lttng-sessiond/main.c
@@ -497,9 +497,6 @@ static void stop_threads(void)
ERR("write error on thread quit pipe");
}
- /* Dispatch thread */
- CMM_STORE_SHARED(dispatch_thread_exit, 1);
- futex_nto1_wake(&ust_cmd_queue.futex);
}
/*
@@ -6306,6 +6303,10 @@ exit_client:
retval = -1;
}
exit_reg_apps:
+ /* Instruct the dispatch thread to quit */
+ CMM_STORE_SHARED(dispatch_thread_exit, 1);
+ futex_nto1_wake(&ust_cmd_queue.futex);
+
ret = pthread_join(dispatch_thread, &status);
if (ret) {
errno = ret;
--
2.11.0
More information about the lttng-dev
mailing list