ustd: add fixme
[ust.git] / libust / tracectl.c
index 17d28dca61394f744077fea45f5fea1bf5d17e43..faa471461c71c901b9399682ac019f0cb8fe1c13 100644 (file)
@@ -772,7 +772,7 @@ void *listener_main(void *p)
        }
 }
 
-int have_listener = 0;
+volatile sig_atomic_t have_listener = 0;
 
 void create_listener(void)
 {
@@ -1006,13 +1006,15 @@ static void __attribute__((constructor(1000))) init()
                        return;
                }
 
-               inform_consumer_daemon(trace_name);
-
                result = ltt_trace_start(trace_name);
                if(result < 0) {
                        ERR("ltt_trace_start failed");
                        return;
                }
+
+               /* Do this after the trace is started in order to avoid creating confusion
+                * if the trace fails to start. */
+               inform_consumer_daemon(trace_name);
        }
 
 
This page took 0.022824 seconds and 4 git commands to generate.