From: Felix Fietkau Date: Tue, 12 May 2015 14:56:09 +0000 (+0200) Subject: cli: flush stdout after printing an event X-Git-Url: http://git.openwrt.org/?p=project%2Fubus.git;a=commitdiff_plain;h=2c30506a4f8434de95d9c3938857599005d0ef51 cli: flush stdout after printing an event Signed-off-by: Felix Fietkau --- diff --git a/cli.c b/cli.c index e4eb504..f3a041a 100644 --- 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); }