Commit d9d8ccab authored by antirez's avatar antirez
Browse files

make sure to flush stdout every line read in monitor mode, to play well with redirection to file

parent 5402c426
...@@ -291,6 +291,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) { ...@@ -291,6 +291,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
redisAppendCommandArgv(context,argc,(const char**)argv,argvlen); redisAppendCommandArgv(context,argc,(const char**)argv,argvlen);
while (config.monitor_mode) { while (config.monitor_mode) {
if (cliReadReply() != REDIS_OK) exit(1); if (cliReadReply() != REDIS_OK) exit(1);
fflush(stdout);
} }
if (config.pubsub_mode) { if (config.pubsub_mode) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment