isatty(3) - Linux man page

Name

isatty - does this descriptor refer to a terminal

Synopsis

#include <unistd.h>

int isatty(int desc);

Description

returns 1 if desc is an open descriptor connected to a terminal and 0 else.

Conforming To

SVr4, 4.3BSD, POSIX.1-2001.

See Also

fstat(2), ttyname(3)

Referenced By

mailcap(4), sh(1), tcpslice(8)