|
|
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.3 6.3 (Berkeley) 5/17/89 ! 6: .\" ! 7: .TH STTY 3C "May 17, 1989" ! 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: These interfaces are obsoleted by ioctl(2). ! 26: .br ! 27: They are available from the compatibility library, libcompat. ! 28: .ft R ! 29: .PP ! 30: .I Stty ! 31: sets the state of the terminal associated with ! 32: .IR fd . ! 33: .I Gtty ! 34: retrieves the state of the terminal associated ! 35: with ! 36: .IR fd . ! 37: To set the state of a terminal the call must have ! 38: write permission. ! 39: .PP ! 40: The ! 41: .I stty ! 42: call is actually ``ioctl(fd, TIOCSETP, buf)'', while ! 43: the ! 44: .I gtty ! 45: call is ``ioctl(fd, TIOCGETP, buf)''. ! 46: See ! 47: .IR ioctl (2) ! 48: and ! 49: .IR tty (4) ! 50: for an explanation. ! 51: .SH DIAGNOSTICS ! 52: If the call is successful 0 is returned, otherwise \-1 is ! 53: returned and the global variable ! 54: .I errno ! 55: contains the reason for the failure. ! 56: .SH SEE ALSO ! 57: ioctl(2), ! 58: tty(4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.