From: Mathieu Desnoyers Date: Wed, 9 Oct 2013 15:57:26 +0000 (-0400) Subject: Fix: join live threads after joining others X-Git-Tag: v2.4.0-rc1~105 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bd11e201a9d7e2f2f71a841a6617aa53074b030a;p=lttng-tools.git Fix: join live threads after joining others Signed-off-by: Mathieu Desnoyers --- 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);