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.

This commit is contained in:
jonathan pickett
2014-04-01 16:04:14 -07:00
parent c3c91f5ab0
commit 8b9a8a0a41
2 changed files with 6 additions and 4 deletions
Binary file not shown.
+6 -4
View File
@@ -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;