diff --git a/src/redis-cli.c b/src/redis-cli.c index 7f877694..11d9b5f0 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1248,6 +1248,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. */