TTYNAME(3C) UNIX Programmer's Manual TTYNAME(3C) NAME ttyname, isatty - find name of a terminal SYNOPSIS char *ttyname (fildes) int isatty (fildes) HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III 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. FILES /dev/* 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. BUGS The return value points to static data whose content is overwritten by each call.