Fix: close channel monitor pipe after killing the metadata_timer_thread
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 12 Oct 2017 15:19:39 +0000 (11:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 15 Nov 2017 23:36:51 +0000 (18:36 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c

index fef03c6f64c44060637934ceb5e873198ed70b80..c0716af25e042098f969dd9bfd5030f6498900ae 100644 (file)
@@ -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;
This page took 0.025887 seconds and 4 git commands to generate.