babeltrace(1): reset console after graph stops running
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 20 May 2017 00:37:30 +0000 (20:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:44 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace.c

index 1af0e21b5f7f7aeb3b13c5b468f9a9989a32deb9..27516cd0829c224eda25e4f26e88bdf1238b2e21 100644 (file)
@@ -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));
 
This page took 0.025919 seconds and 4 git commands to generate.