From: Mathieu Desnoyers Date: Mon, 5 Apr 2010 18:36:13 +0000 (-0400) Subject: Fix lttctl flight recorder wait for daemon (temp fix) X-Git-Tag: 0.83 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=635683d75350f395da23354a7524dfd0a1363d48;p=ltt-control.git Fix lttctl flight recorder wait for daemon (temp fix) Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.in b/configure.in index 0970b7e..5246ff0 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/lttctl/lttctl.c b/lttctl/lttctl.c index afa55b6..e77b7f3 100644 --- a/lttctl/lttctl.c +++ b/lttctl/lttctl.c @@ -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); }