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 4.0 — Last change: 6 October 1987