Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Fix redis-cli pipe mode
Browse files Browse the repository at this point in the history
Pipe mode was broken due to CRT's translation of CRLF sequences.
  • Loading branch information
orangemocha committed Jan 2, 2015
1 parent a659c7c commit 7796c03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/redis-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 7796c03

Please sign in to comment.