diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-17 19:52:08 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-17 20:03:42 +0100 |
commit | 1bb296ea707505bdb6c172ee353b460224738d69 (patch) | |
tree | abab08c3c630eae349341bf5864594b79eb7ed5c /Base/usr/share | |
parent | 3da6d89d1f40d82fa0b6bdc3aec99a8919661797 (diff) | |
download | serenity-1bb296ea707505bdb6c172ee353b460224738d69.zip |
Docs: Add isatty(3) man page
Diffstat (limited to 'Base/usr/share')
-rw-r--r-- | Base/usr/share/man/man3/isatty.md | 24 |
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. |