ttyname - file descriptor to terminal device name
#define _POSIX_SOURCE 1 #include <unistd.h> char *ttyname(int fd)
Ttyname searches through the /dev directory for the terminal device file that is associated with file descriptor fd. It returns the full path name of the terminal file if found, NULL is returned otherwise.
ttyslot(3).
Kees J. Bot (kjb@cs.vu.nl)