TTYNAME(E) Linux Programmer's Manual TTYNAME(E) NAME ttyname - return name of a terminal SYNOPSIS #include <unistd.h> char *ttyname(int desc); DESCRIPTION Returns a pointer to the pathname of the terminal device that is open on the file descriptor desc, or NULL on error (for example, if desc is not connected to a terminal). The return value may point to static data, possibly over- written by the next call. CONFORMING TO POSIX.1 SEE ALSO fstat(t), isatty(y) Linux 2001-12-13 TTYNAME(E)