Fork handling: fix deadlock between mutex and semaphore
[ust.git] / libust / lttng-ust-comm.c
index b6c5de51e456e5e3d8f501fd75265819eeebf199..e76807975c1b4a1af15fbe8f0950fa238b5c9176 100644 (file)
@@ -37,6 +37,7 @@
 #include <ust/tracepoint.h>
 #include <ust/tracepoint-internal.h>
 #include <ust/ust.h>
+#include "ltt-tracer-core.h"
 
 /*
  * Has lttng ust comm constructor been called ?
@@ -278,6 +279,7 @@ void cleanup_sock_info(struct sock_info *sock_info)
                }
                sock_info->root_handle = -1;
        }
+       sock_info->constructor_sem_posted = 0;
 }
 
 /*
@@ -618,7 +620,7 @@ void ust_after_fork_child(ust_fork_info_t *fork_info)
        /* Release urcu mutexes */
        rcu_bp_after_fork_child();
        lttng_ust_cleanup(0);
-       lttng_ust_init();
        /* Release mutexes and reenable signals */
        ust_after_fork_common(fork_info);
+       lttng_ust_init();
 }
This page took 0.022928 seconds and 4 git commands to generate.