From 5669a3e7a4b32dc1fb2b9dea7cb7a36e68ce5c0e Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 19 May 2017 20:37:30 -0400 Subject: [PATCH] babeltrace(1): reset console after graph stops running MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- cli/babeltrace.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/babeltrace.c b/cli/babeltrace.c index 1af0e21b5..27516cd08 100644 --- a/cli/babeltrace.c +++ b/cli/babeltrace.c @@ -1756,6 +1756,13 @@ int cmd_run(struct bt_config *cfg) while (true) { enum bt_graph_status graph_status = bt_graph_run(ctx.graph); + /* + * Reset console in case something messed with console + * codes during the graph's execution. + */ + printf("%s", bt_common_color_reset()); + fflush(stdout); + fprintf(stderr, "%s", bt_common_color_reset()); BT_LOGV("bt_graph_run() returned: status=%s", bt_graph_status_str(graph_status)); -- 2.34.1