STTY(3C) UNIX Programmer's Manual STTY(3C) NAME stty, gtty - set and get terminal state (defunct) SYNOPSIS #include stty(fd, buf) int fd; struct sgttyb *buf; gtty(fd, buf) int fd; struct sgttyb *buf; DESCRIPTION This interface is obsoleted by ioctl(2). _S_t_t_y sets the state of the terminal associated with _f_d. _G_t_t_y retrieves the state of the terminal associated with _f_d. To set the state of a terminal the call must have write per- mission. The _s_t_t_y call is actually ``ioctl(fd, TIOCSETP, buf)'', while the _g_t_t_y call is ``ioctl(fd, TIOCGETP, buf)''. See _i_o_c_t_l(2) and _t_t_y(4) for an explanation. DIAGNOSTICS If the call is successful 0 is returned, otherwise -1 is returned and the global variable _e_r_r_n_o contains the reason for the failure. SEE ALSO ioctl(2), tty(4) Printed 11/26/99 May 15, 1985 1