logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface

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.

Description

       The  isatty()  function shall test whether fildes, an open file descriptor, is associated with a terminal
       device.

Errors

       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.

       Thefollowingsectionsareinformative.

Examples

       None.

Future Directions

       None.

Name

       isatty — 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.

Rationale

       None.

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.

See Also

       The Base Definitions volume of POSIX.1‐2017, <unistd.h>

Synopsis

       #include <unistd.h>

       int isatty(int fildes);

See Also