From bd11e201a9d7e2f2f71a841a6617aa53074b030a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 9 Oct 2013 11:57:26 -0400 Subject: [PATCH] Fix: join live threads after joining others Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-relayd/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 81aa642b1..33aad88ee 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2634,8 +2634,6 @@ int main(int argc, char **argv) goto exit_live; } - live_stop_threads(); - exit_live: ret = pthread_join(listener_thread, &status); if (ret != 0) { @@ -2664,6 +2662,11 @@ exit_dispatcher: goto error; /* join error, exit without cleanup */ } + /* + * Stop live threads only after joining other threads. + */ + live_stop_threads(); + health_error: utils_close_pipe(health_quit_pipe); -- 2.34.1