提交 8b9a8a0a 编写于 作者: J jonathan pickett

In linenoise.c in linenoiseRaw() isatty() is called on stdin in order to...

In linenoise.c in linenoiseRaw() isatty() is called on stdin in order to determine where to send the redis-cli prompt. The FDAPI implementation of isatty was not handling this case, so the prompt was not showing up.
上级 c3c91f5a
......@@ -820,10 +820,12 @@ int redis_isatty_impl(int fd) {
int posixFD = RFDMap::getInstance().lookupPosixFD(fd);
if( posixFD != -1) {
return crt_isatty(posixFD);
} else {
errno = EBADF;
return 0;
}
} else if (fd >= 0 && fd <= 2) {
return crt_isatty(fd);
} else {
errno = EBADF;
return 0;
}
} CATCH_AND_REPORT();
errno = EBADF;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册