File:  [CSRG BSD Unix] / 43BSDReno / lib / libcompat / 4.1 / stty.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)stty.3	6.3 (Berkeley) 5/17/89
.\"
.TH STTY 3C "May 17, 1989"
.UC 5
.SH NAME
stty, gtty \- set and get terminal state (defunct)
.SH SYNOPSIS
.nf
.B #include <sgtty.h>
.sp
.B stty(fd, buf)
.B int fd;
.B struct sgttyb *buf;
.sp
.B gtty(fd, buf)
.B int fd;
.B struct sgttyb *buf;
.fi
.SH DESCRIPTION
.ft B
These interfaces are obsoleted by ioctl(2).
.br
They are available from the compatibility library, libcompat.
.ft R
.PP
.I Stty
sets the state of the terminal associated with
.IR fd .
.I Gtty
retrieves the state of the terminal associated
with
.IR fd .
To set the state of a terminal the call must have
write permission.
.PP
The
.I stty
call is actually ``ioctl(fd, TIOCSETP, buf)'', while
the
.I gtty
call is ``ioctl(fd, TIOCGETP, buf)''.
See 
.IR ioctl (2)
and
.IR tty (4)
for an explanation.
.SH DIAGNOSTICS
If the call is successful 0 is returned, otherwise \-1 is
returned and the global variable
.I errno
contains the reason for the failure.
.SH SEE ALSO
ioctl(2),
tty(4)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.