From: David Goulet Date: Wed, 14 Nov 2012 18:42:44 +0000 (-0500) Subject: Fix: Warn if session is running with lttng view X-Git-Tag: v2.1.0-rc8~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=94e60b1f03ae2c3c9450ffc3eca8e052e2c37fb4;p=lttng-tools.git Fix: Warn if session is running with lttng view Fixes #156 Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index 430f8b62c..dd3c9a3cc 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -343,6 +343,13 @@ static int view_trace(void) trace_path = opt_trace_path; } + if (sessions[i].enabled) { + WARN("Session %s is running. Please stop it before reading it.", + session_name); + ret = CMD_ERROR; + goto free_sessions; + } + MSG("Trace directory: %s\n", trace_path); ret = spawn_viewer(trace_path);