summaryrefslogtreecommitdiff
path: root/Base/usr
diff options
context:
space:
mode:
Diffstat (limited to 'Base/usr')
-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.