TTYNAME(3) UNIX Programmer's Manual TTYNAME(3) NAME ttyname, isatty, ttyslot - find name of a terminal SYNOPSIS char *ttyname(fildes) isatty(fildes) ttyslot() DESCRIPTION _T_t_y_n_a_m_e returns a pointer to the null-terminated path name of the terminal device associated with file descriptor _f_i_l_d_e_s. _I_s_a_t_t_y returns 1 if _f_i_l_d_e_s is associated with a terminal device, 0 otherwise. _T_t_y_s_l_o_t returns the number of the entry in the _t_t_y_s(5) file for the control terminal of the current process. FILES /dev/* /etc/ttys SEE ALSO ioctl(2), ttys(5) DIAGNOSTICS _T_t_y_n_a_m_e returns a null pointer (0) if _f_i_l_d_e_s does not describe a terminal device in directory `/dev'. _T_t_y_s_l_o_t returns 0 if `/etc/ttys' is inaccessible or if it cannot determine the control terminal. BUGS The return value points to static data whose contents are overwritten by each call. Printed 7/31/83 1