тест для оконечного устройства (test for a terminal device)
Пролог (Prolog)
This manual page is part of the POSIX Programmer's Manual. The
Linux implementation of this interface may differ (consult the
corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
Имя (Name)
isatty — test for a terminal device
Синопсис (Synopsis)
#include <unistd.h>
int isatty(int fildes);
Описание (Description)
The isatty() function shall test whether fildes, an open file
descriptor, is associated with a terminal device.
Возвращаемое значение (Return value)
The isatty() function shall return 1 if fildes is associated with
a terminal; otherwise, it shall return 0 and may set errno to
indicate the error.
Ошибки (Error)
The isatty() function may fail if:
EBADF
The fildes argument is not a valid open file descriptor.
ENOTTY
The file associated with the fildes argument is not a
terminal.
The following sections are informative.
Примеры (Examples)
None.
Использование в приложениях (Application usage)
The isatty() function does not necessarily indicate that a human
being is available for interaction via fildes. It is quite
possible that non-terminal devices are connected to the
communications line.
Обоснование (Rationale)
None.
Будущие направления (Future directions)
None.
Смотри также (See also)
The Base Definitions volume of POSIX.1‐2017, unistd.h(0p)