11970Swnj /* 2*61111Sbostic * Copyright (c) 1988, 1993 3*61111Sbostic * The Regents of the University of California. All rights reserved. 435453Sbostic * 542625Sbostic * %sccs.include.redist.c% 61970Swnj */ 71970Swnj 835453Sbostic #if defined(LIBC_SCCS) && !defined(lint) 9*61111Sbostic static char sccsid[] = "@(#)isatty.c 8.1 (Berkeley) 06/04/93"; 1035453Sbostic #endif /* LIBC_SCCS and not lint */ 1135453Sbostic 1240100Smarc #include <termios.h> 1346597Sdonn #include <unistd.h> 141970Swnj 1546597Sdonn int isatty(fd)1635453Sbosticisatty(fd) 1735453Sbostic int fd; 181970Swnj { 1940100Smarc struct termios t; 201970Swnj 2140100Smarc return(tcgetattr(fd, &t) != -1); 221970Swnj } 23