stty, gtty - set and get terminal state
#include <sgtty.h>
stty(
int fd,
struct sgttyb *buf ); gtty(
int fd,
struct sgttyb *buf );
The stty() subroutine sets the state of the terminal associated
with fd. The gtty() subroutine retrieves the state
of the terminal associated with fd. To set the state of a
terminal, the stty() call must have write permission.
Calls to these subroutines, supported only to ensure BSD
binary compatibility, have been superseded by the ioctl()
system call. The stty() call is implemented as ioctl(fd,
TIOCSETP, buf), and the gtty() call is implemented as
ioctl(fd, TIOCGETP, buf). See ioctl(2) and tty(7) for more
information.
If the call is successful, zero is returned; otherwise, -1
is returned and the global variable errno indicates the
reason for the failure.
Functions: ioctl(2)
Files: tty(7)
stty(3)
[ Back ] |