From: Jonathan Rajotte Date: Thu, 12 Oct 2017 15:19:39 +0000 (-0400) Subject: Fix: close channel monitor pipe after killing the metadata_timer_thread X-Git-Tag: v2.11.0-rc1~430 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=99b597c03bd9e7e12a1c2a37e40077065061880e;p=lttng-tools.git Fix: close channel monitor pipe after killing the metadata_timer_thread Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index fef03c6f6..c0716af25 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -576,14 +576,6 @@ int main(int argc, char **argv) PERROR("pthread_join sessiond_thread"); retval = -1; } - - ret = consumer_timer_thread_get_channel_monitor_pipe(); - if (ret >= 0) { - ret = close(ret); - if (ret) { - PERROR("close channel monitor pipe"); - } - } exit_sessiond_thread: ret = pthread_join(data_thread, &status); @@ -650,6 +642,13 @@ exit_init_data: PERROR("pthread_join metadata_timer_thread"); retval = -1; } + ret = consumer_timer_thread_get_channel_monitor_pipe(); + if (ret >= 0) { + ret = close(ret); + if (ret) { + PERROR("close channel monitor pipe"); + } + } metadata_timer_thread_online = false; } tmp_ctx = ctx;