提交 7796c039 编写于 作者: A Alexis Campailla

Fix redis-cli pipe mode

Pipe mode was broken due to CRT's translation of CRLF sequences.
上级 a659c7c1
......@@ -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. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册