Fix: Initialize fd field of struct lttng_ust_elf to -1 at allocation
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index e92bb870d4d58abcd2874ab80e9e7e56525a591d..f1a8ff005b4a5719f4b2af5a9f3c0e7c4e4a2bde 100644 (file)
@@ -1382,6 +1382,10 @@ restart:
                prev_connect_failed = 0;
        }
 
+       if (ust_lock()) {
+               goto quit;
+       }
+
        if (sock_info->socket != -1) {
                /* FD tracker is updated by ustcomm_close_unix_sock() */
                ret = ustcomm_close_unix_sock(sock_info->socket);
@@ -1401,9 +1405,6 @@ restart:
                sock_info->notify_socket = -1;
        }
 
-       if (ust_lock()) {
-               goto quit;
-       }
 
        /*
         * Register. We need to perform both connect and sending
@@ -1969,7 +1970,9 @@ void ust_after_fork_child(sigset_t *restore_sigset)
 {
        if (URCU_TLS(lttng_ust_nest_count))
                return;
+       lttng_context_vpid_reset();
        lttng_context_vtid_reset();
+       lttng_context_procname_reset();
        DBG("process %d", getpid());
        /* Release urcu mutexes */
        rcu_bp_after_fork_child();
This page took 0.024171 seconds and 4 git commands to generate.