1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

Docs: Add isatty(3) man page

This commit is contained in:
Andreas Kling 2019-11-17 19:52:08 +01:00
parent 3da6d89d1f
commit 1bb296ea70

View file

@ -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.