From d9d8ccab93ac18ab38ac19811bc05582c7f9f550 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 8 Nov 2010 16:14:15 +0100 Subject: [PATCH] make sure to flush stdout every line read in monitor mode, to play well with redirection to file --- src/redis-cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/redis-cli.c b/src/redis-cli.c index fec0fce4..450c6d58 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -291,6 +291,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) { redisAppendCommandArgv(context,argc,(const char**)argv,argvlen); while (config.monitor_mode) { if (cliReadReply() != REDIS_OK) exit(1); + fflush(stdout); } if (config.pubsub_mode) { -- 2.45.2