diff --git a/src/redis-cli.c b/src/redis-cli.c index 88565d439372e304519784b13a53781f1fd2be70..1aad2c15ed60dc46bcad00adf2c8d02708266c1e 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1246,6 +1246,11 @@ static void pipeMode(void) { char magic[20]; /* Special reply we recognize. */ time_t last_read_time = time(NULL); +#ifdef _WIN32 + /* Prevent translation or CRLF sequences. */ + setmode(STDIN_FILENO,_O_BINARY); +#endif + srand((unsigned int)time(NULL)); /* Use non blocking I/O. */