From 94e60b1f03ae2c3c9450ffc3eca8e052e2c37fb4 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 14 Nov 2012 13:42:44 -0500 Subject: [PATCH] Fix: Warn if session is running with lttng view Fixes #156 Signed-off-by: David Goulet --- src/bin/lttng/commands/view.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.34.1