X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttctl%2Flttctl.c;h=afa55b67cc85bede5a51b44692d32a05c542d78c;hb=0d45cf3dcfdab3f2eaad91d1a384d83fc6219868;hp=e5631928053c4930b57f5ae35b9754a7070b5a85;hpb=ed2849af3f76f53cf8d13421d1534fd7db7161f8;p=ltt-control.git diff --git a/lttctl/lttctl.c b/lttctl/lttctl.c index e563192..afa55b6 100644 --- a/lttctl/lttctl.c +++ b/lttctl/lttctl.c @@ -156,6 +156,11 @@ static void show_arguments(void) printf(" Set channels root path, For -w option." " (ex. /mnt/debugfs/ltt)\n"); printf("\n"); + printf(" Environment variables:\n"); + printf(" LTT_DAEMON\n"); + printf(" Complete path to the lttd binary (needs to be\n"); + printf(" specified if different than package build prefix).\n"); + printf("\n"); } /* @@ -691,10 +696,13 @@ setup_trace_fail: } /* - * Start a lttd daemon to write trace datas + * Start a lttd daemon to write trace data * Dump overwrite channels on overwrite!=0 * Dump normal(non-overwrite) channels on overwrite=0 * + * When called for overwrite mode, wait for lttd to return, so we are sure that + * trace session teardown is not executed before lttd can grab the buffer data. + * * ret: 0 on success * !0 on fail */ @@ -755,8 +763,10 @@ static int lttctl_daemon(int overwrite) } /* -d option */ - argv[argc] = "-d"; - argc++; + if (!overwrite) { + argv[argc] = "-d"; + argc++; + } /* overwrite option */ if (overwrite) {