X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=1542fe8e1cb6ae6a91db693a5528338037575390;hp=27acbada09627970ee2c6a46ebe301bacf4e2ae9;hb=c996624c35518e5c90bcafbbfee5c9bcade1da49;hpb=a1ae2ea59428174575b7328b1062a6248d636b72 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 27acbada0..1542fe8e1 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2519,8 +2519,20 @@ int cmd_start_trace(struct ltt_session *session) goto error; } + if (!session->has_been_started) { + if (!session->snapshot_mode && session->output_traces) { + ret = session_mkdir(session); + if (ret) { + ERR("Failed to create the session directories"); + ret = LTTNG_ERR_CREATE_DIR_FAIL; + goto error; + } + } + } + /* Kernel tracing */ if (ksession != NULL) { + DBG("Start kernel tracing session %s", session->name); ret = start_kernel_session(ksession, kernel_tracer_fd); if (ret != LTTNG_OK) { goto error;