From 1bb296ea707505bdb6c172ee353b460224738d69 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 17 Nov 2019 19:52:08 +0100 Subject: [PATCH] Docs: Add isatty(3) man page --- Base/usr/share/man/man3/isatty.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Base/usr/share/man/man3/isatty.md 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 + +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.