COHERENT manpages

This page displays the COHERENT manpage for ttyname() [Identify a terminal].

List of available manpages
Index


ttyname() -- General Function (libc)

Identify a terminal
#include <unistd.h>
char *ttyname(fd)
int fd;

Given a  file descriptor fd  attached to a terminal,  ttyname() returns the
complete  pathname of  the special  file (normally  found in  the directory
/dev).

Files

/dev/* -- Terminal special files
/etc/ttys -- Login terminals

See Also

ioctl(),
isatty(),
libc,
tty(),
ttyslot(),
unistd.h
POSIX Standard, §4.7.2

Diagnostics

ttyname() returns  NULL if it  cannot find a special  file corresponding to
fd.

Notes

The  string  returned  by ttyname()  is  kept  in  a  static area,  and  is
overwritten by each subsequent call.