TTYNAME(3) — C LIBRARY FUNCTIONS
NAME
ttyname, isatty − find name of a terminal
SYNOPSIS
char ∗ttyname(filedes)
isatty(filedes)
DESCRIPTION
ttyname returns a pointer to the null-terminated path name of the terminal device associated with file descriptor filedes.
isatty returns 1 if filedes is associated with a terminal device, 0 otherwise.
FILES
/dev/∗
SEE ALSO
DIAGNOSTICS
ttyname returns a NULL pointer if filedes does not describe a terminal device in directory /dev.
BUGS
The return value points to static data whose content is overwritten by each call.
Sun Release 3.2 — Last change: 22 May 1986