Fix lttctl flight recorder wait for daemon (temp fix) 0.83
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 5 Apr 2010 18:36:13 +0000 (14:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 5 Apr 2010 18:36:13 +0000 (14:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.in
lttctl/lttctl.c

index 0970b7e6bc5eb855e00464a6bc005afc464857e7..5246ff01f97a608547c0b91a174457d17ecce302 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(ltt-control,0.82-02042010)
+AM_INIT_AUTOMAKE(ltt-control,0.83-05042010)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index afa55b67cc85bede5a51b44692d32a05c542d78c..e77b7f38d6833f8abc2cc8dd0fba8b19b9a9c146 100644 (file)
@@ -763,10 +763,8 @@ static int lttctl_daemon(int overwrite)
                }
 
                /* -d option */
-               if (!overwrite) {
-                       argv[argc] = "-d";
-                       argc++;
-               }
+               argv[argc] = "-d";
+               argc++;
 
                /* overwrite option */
                if (overwrite) {
@@ -799,6 +797,16 @@ static int lttctl_daemon(int overwrite)
        if (WEXITSTATUS(status))
                fprintf(stderr, "lttd process running failed\n");
 
+       /*
+        * FIXME
+        * This is a temporary hack to ensure that the lttd daemon grabs
+        * handles on the debugfs buffer files before we destroy the trace
+        * session. Properly handling this will imply separating the "flush"
+        * from the "destroy" operation at kernel-level in LTTng.
+        */
+       if (overwrite)
+               sleep(2);
+
        return WEXITSTATUS(status);
 }
 
This page took 0.023642 seconds and 4 git commands to generate.