cli: flush stdout after printing an event
authorFelix Fietkau <nbd@openwrt.org>
Tue, 12 May 2015 14:56:09 +0000 (16:56 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 12 May 2015 14:56:09 +0000 (16:56 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
cli.c

diff --git a/cli.c b/cli.c
index e4eb504..f3a041a 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -86,6 +86,7 @@ static void receive_event(struct ubus_context *ctx, struct ubus_event_handler *e
 
        str = blobmsg_format_json(msg, true);
        printf("{ \"%s\": %s }\n", type, str);
+       fflush(stdout);
        free(str);
 }