summaryrefslogtreecommitdiff
path: root/Base/usr/share
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-17 19:52:08 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-17 20:03:42 +0100
commit1bb296ea707505bdb6c172ee353b460224738d69 (patch)
treeabab08c3c630eae349341bf5864594b79eb7ed5c /Base/usr/share
parent3da6d89d1f40d82fa0b6bdc3aec99a8919661797 (diff)
downloadserenity-1bb296ea707505bdb6c172ee353b460224738d69.zip
Docs: Add isatty(3) man page
Diffstat (limited to 'Base/usr/share')
-rw-r--r--Base/usr/share/man/man3/isatty.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/Base/usr/share/man/man3/isatty.md b/Base/usr/share/man/man3/isatty.md
new file mode 100644
index 0000000000..366607dcf1
--- /dev/null
+++ b/Base/usr/share/man/man3/isatty.md
@@ -0,0 +1,24 @@
+## Name
+
+isatty - check if a file descriptor is a TTY
+
+## Synopsis
+
+```**c++
+#include <unistd.h>
+
+int isatty(int fd);
+```
+
+## Description
+
+Checks if the device inside a given file descriptor is a TTY device.
+
+## Return value
+
+If `fd` refers to a TTY device, returns 1. Otherwise, returns 0 and `errno` is set to describe the error.
+
+## Errors
+
+* `EBADF`: `fd` is not an open file descriptor.
+* `ENOTTY`: `fd` refers to something that's not a TTY device.