summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-17 20:11:56 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-17 20:11:56 +0100
commit5eef2f78b06f5ec7999ac016fd5d0703cfc0f811 (patch)
treee7ab805f6c9eb6abaa3a71e4acbf855020492ad6 /Libraries
parent70e220a81f5205e89859093771616ff5cdb87d81 (diff)
downloadserenity-5eef2f78b06f5ec7999ac016fd5d0703cfc0f811.zip
LibC: isatty() should return 1 for success, 0 for error
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/unistd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index 8fe148cd21..79d10e6042 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -331,7 +331,7 @@ int rmdir(const char* pathname)
int isatty(int fd)
{
struct termios dummy;
- return tcgetattr(fd, &dummy);
+ return tcgetattr(fd, &dummy) == 0;
}
int getdtablesize()