1isatty(3C)               Standard C Library Functions               isatty(3C)
2
3
4

NAME

6       isatty - test for a terminal device
7

SYNOPSIS

9       #include <unistd.h>
10
11       int isatty(int fildes);
12
13

DESCRIPTION

15       The isatty() function tests whether fildes, an open file descriptor, is
16       associated with a terminal device.
17

RETURN VALUES

19       The isatty() function returns 1 if fildes is associated with  a  termi‐
20       nal; otherwise it returns 0 and may set errno to indicate the error.
21

ERRORS

23       The isatty() function may fail if:
24
25       EBADF     The fildes argument is not a valid open file descriptor.
26
27
28       ENOTTY    The fildes argument is not associated with a terminal.
29
30

USAGE

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

ATTRIBUTES

37       See attributes(5) for descriptions of the following attributes:
38
39
40
41
42       ┌─────────────────────────────┬─────────────────────────────┐
43       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
44       ├─────────────────────────────┼─────────────────────────────┤
45       │Interface Stability          │Standard                     │
46       ├─────────────────────────────┼─────────────────────────────┤
47       │MT-Level                     │MT-Safe                      │
48       └─────────────────────────────┴─────────────────────────────┘
49

SEE ALSO

51       ttyname(3C), attributes(5), standards(5)
52
53
54
55SunOS 5.11                        24 Jul 2002                       isatty(3C)
Impressum