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:
parent
3da6d89d1f
commit
1bb296ea70
1 changed files with 24 additions and 0 deletions
24
Base/usr/share/man/man3/isatty.md
Normal file
24
Base/usr/share/man/man3/isatty.md
Normal 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.
|
Loading…
Add table
Add a link
Reference in a new issue