.\" Copyright (c) 1991 The Regents of the University of California.
.\" %sccs.include.redist.man%
.\" @(#)ttyname.3 6.2 (Berkeley) %G%
.Nd get name of associated terminal (tty) from file descriptor
These functions operate on the system file descriptors for terminal
type devices. These descriptors are not related to the standard
typedef, but refer to the special device files found in
and for which an entry exists
in the initialization file
determines if the file descriptor
gets the related device name of
a file descriptor for which
fetches the current process' control terminal number from the
returns the null terminated name if the device is found and
returns the unit number of the device file if found; otherwise
the value zero is returned.
.Bl -tag -width /etc/ttys -compact
function leaves its result in an internal static object and returns
a pointer to that object. Subsequent calls to
will modify the same object.