From: Philippe Proulx Date: Sat, 20 May 2017 00:37:30 +0000 (-0400) Subject: babeltrace(1): reset console after graph stops running X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=5669a3e7a4b32dc1fb2b9dea7cb7a36e68ce5c0e;p=deliverable%2Fbabeltrace.git babeltrace(1): reset console after graph stops running Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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));