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