1ISATTY(P) POSIX Programmer's Manual ISATTY(P)
2
3
4
6 isatty - test for a terminal device
7
9 #include <unistd.h>
10
11 int isatty(int fildes);
12
13
15 The isatty() function shall test whether fildes, an open file descripâ
16 tor, is associated with a terminal device.
17
19 The isatty() function shall return 1 if fildes is associated with a
20 terminal; otherwise, it shall return 0 and may set errno to indicate
21 the error.
22
24 The isatty() function may fail if:
25
26 EBADF The fildes argument is not a valid open file descriptor.
27
28 ENOTTY The fildes argument is not associated with a terminal.
29
30
31 The following sections are informative.
32
34 None.
35
37 The isatty() function does not necessarily indicate that a human being
38 is available for interaction via fildes. It is quite possible that non-
39 terminal devices are connected to the communications line.
40
42 None.
43
45 None.
46
48 The Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
49
51 Portions of this text are reprinted and reproduced in electronic form
52 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
53 -- Portable Operating System Interface (POSIX), The Open Group Base
54 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
55 Electrical and Electronics Engineers, Inc and The Open Group. In the
56 event of any discrepancy between this version and the original IEEE and
57 The Open Group Standard, the original IEEE and The Open Group Standard
58 is the referee document. The original Standard can be obtained online
59 at http://www.opengroup.org/unix/online.html .
60
61
62
63IEEE/The Open Group 2003 ISATTY(P)