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 e4eb504bb185eaf1c0317d6926cb14030f118c5d..f3a041a064b8d93af735aa65c6f1b7ad1becc732 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);
 }