Commit | Line | Data |
---|---|---|
b5799bf2 | 1 | /* |
74155b62 KB |
2 | * Copyright (c) 1988, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
81627469 | 4 | * |
269a7923 | 5 | * %sccs.include.redist.c% |
b5799bf2 BJ |
6 | */ |
7 | ||
81627469 | 8 | #if defined(LIBC_SCCS) && !defined(lint) |
74155b62 | 9 | static char sccsid[] = "@(#)isatty.c 8.1 (Berkeley) %G%"; |
81627469 KB |
10 | #endif /* LIBC_SCCS and not lint */ |
11 | ||
8ff9d8b5 | 12 | #include <termios.h> |
c5980113 | 13 | #include <unistd.h> |
b5799bf2 | 14 | |
c5980113 | 15 | int |
81627469 KB |
16 | isatty(fd) |
17 | int fd; | |
b5799bf2 | 18 | { |
8ff9d8b5 | 19 | struct termios t; |
b5799bf2 | 20 | |
8ff9d8b5 | 21 | return(tcgetattr(fd, &t) != -1); |
b5799bf2 | 22 | } |