ttttyynnaammee() -- General Function (libc)

Identify a terminal
#iinncclluuddee <uunniissttdd.hh>
cchhaarr *ttttyynnaammee(_f_d)
iinntt _f_d;

Given a  file descriptor _f_d  attached to a terminal,  ttttyynnaammee() returns the
complete  pathname of  the special  file (normally  found in  the directory
/ddeevv).

_F_i_l_e_s
/ddeevv/* -- Terminal special files
/eettcc/ttttyyss -- Login terminals

_S_e_e _A_l_s_o
iiooccttll(), iissaattttyy(), lliibbcc, ttttyy(), ttttyysslloott(), uunniissttdd.hh
POSIX Standard, section 4.7.2

_D_i_a_g_n_o_s_t_i_c_s
ttttyynnaammee() returns  NULL if it  cannot find a special  file corresponding to
_f_d.

_N_o_t_e_s
The  string  returned  by ttttyynnaammee()  is  kept  in  a  static area,  and  is
overwritten by each subsequent call.
