1ISATTY(3P)                 POSIX Programmer's Manual                ISATTY(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       isatty - test for a terminal device
13

SYNOPSIS

15       #include <unistd.h>
16
17       int isatty(int fildes);
18
19

DESCRIPTION

21       The isatty() function shall test whether fildes, an open file  descrip‐
22       tor, is associated with a terminal device.
23

RETURN VALUE

25       The  isatty()  function  shall  return 1 if fildes is associated with a
26       terminal; otherwise, it shall return 0 and may set  errno  to  indicate
27       the error.
28

ERRORS

30       The isatty() function may fail if:
31
32       EBADF  The fildes argument is not a valid open file descriptor.
33
34       ENOTTY The fildes argument is not associated with a terminal.
35
36
37       The following sections are informative.
38

EXAMPLES

40       None.
41

APPLICATION USAGE

43       The  isatty() function does not necessarily indicate that a human being
44       is available for interaction via fildes. It is quite possible that non-
45       terminal devices are connected to the communications line.
46

RATIONALE

48       None.
49

FUTURE DIRECTIONS

51       None.
52

SEE ALSO

54       The Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
55
57       Portions  of  this text are reprinted and reproduced in electronic form
58       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
59       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
60       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
61       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
62       event of any discrepancy between this version and the original IEEE and
63       The  Open Group Standard, the original IEEE and The Open Group Standard
64       is the referee document. The original Standard can be  obtained  online
65       at http://www.opengroup.org/unix/online.html .
66
67
68
69IEEE/The Open Group                  2003                           ISATTY(3P)
Impressum