summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-11-08 16:32:51 +0100
committerantirez <antirez@gmail.com>2010-11-08 16:32:51 +0100
commitf7ba093969f432b03fd846a6a61fd9b6986c8823 (patch)
tree09d11fddc9dd6e244574556ab7568a7bab99ddba
parent1c14507366d0026eecc50530664b4dd58cd3eaa5 (diff)
downloadredis-f7ba093969f432b03fd846a6a61fd9b6986c8823.tar.gz
make sure to flush stdout every line read in monitor mode, to play well with redirection to file
-rw-r--r--redis-cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/redis-cli.c b/redis-cli.c
index 96d1ae50a..01a68624d 100644
--- a/redis-cli.c
+++ b/redis-cli.c
@@ -304,6 +304,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
while (config.monitor_mode) {
if (cliReadSingleLineReply(fd,0)) exit(1);
printf("\n");
+ fflush(stdout);
}
if (config.pubsub_mode) {