TTYNAME(3C) — UNIX 3.0
NAME
ttyname, isatty − find name of a terminal
SYNOPSIS
char ∗ttyname (fildes)
int isatty (fildes)
DESCRIPTION
Ttyname returns a pointer to the null-terminated path name of the terminal device associated with file descriptor fildes.
Isatty returns 1 if fildes is associated with a terminal device, 0 otherwise.
FILES
/dev/∗
DIAGNOSTICS
Ttyname returns a null pointer (0) if fildes does not describe a terminal device in directory /dev.
BUGS
The return value points to static data whose content is overwritten by each call.
May 16, 1980