TTYNAME(3)
NAME
ttyname, isatty − find name of a terminal
USAGE
char *ttyname(filedes)
isatty(filedes)
DESCRIPTION
Ttyname returns a pointer to the null-terminated pathname of the terminal device associated with file descriptor filedes (this is a system file descriptor and has nothing to do with the standard I/O FILE typedef).
Isatty returns 1 if filedes is associated with a terminal device; otherwise, it returns zero.
NOTES
The return value points to static data whose content is overwritten by each call.
FILES
/dev/* various devices
DIAGNOSTICS
Ttyname returns a null pointer (zero) if filedes does not describe a terminal device in directory /dev.