|
|
1.1 root 1: .\" Copyright (c) 1983 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)stty.3c 6.1 (Berkeley) 5/15/85
6: .\"
7: .TH STTY 3C "May 15, 1985"
8: .UC 5
9: .SH NAME
10: stty, gtty \- set and get terminal state (defunct)
11: .SH SYNOPSIS
12: .nf
13: .B #include <sgtty.h>
14: .sp
15: .B stty(fd, buf)
16: .B int fd;
17: .B struct sgttyb *buf;
18: .sp
19: .B gtty(fd, buf)
20: .B int fd;
21: .B struct sgttyb *buf;
22: .fi
23: .SH DESCRIPTION
24: .ft B
25: This interface is obsoleted by ioctl(2).
26: .ft R
27: .PP
28: .I Stty
29: sets the state of the terminal associated with
30: .IR fd .
31: .I Gtty
32: retrieves the state of the terminal associated
33: with
34: .IR fd .
35: To set the state of a terminal the call must have
36: write permission.
37: .PP
38: The
39: .I stty
40: call is actually ``ioctl(fd, TIOCSETP, buf)'', while
41: the
42: .I gtty
43: call is ``ioctl(fd, TIOCGETP, buf)''.
44: See
45: .IR ioctl (2)
46: and
47: .IR tty (4)
48: for an explanation.
49: .SH DIAGNOSTICS
50: If the call is successful 0 is returned, otherwise \-1 is
51: returned and the global variable
52: .I errno
53: contains the reason for the failure.
54: .SH SEE ALSO
55: ioctl(2),
56: tty(4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.