STTY(3) BSD Programmer's Manual STTY(3)
s
\bst
\btt
\bty
\by, g
\bgt
\btt
\bty
\by - set and get terminal state (defunct)
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bsg
\bgt
\btt
\bty
\by.
\b.h
\bh>
\b>
s
\bst
\btt
\bty
\by(_
\bi_
\bn_
\bt _
\bf_
\bd, _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bs_
\bg_
\bt_
\bt_
\by_
\bb _
\b*_
\bb_
\bu_
\bf);
g
\bgt
\btt
\bty
\by(_
\bi_
\bn_
\bt _
\bf_
\bd, _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bs_
\bg_
\bt_
\bt_
\by_
\bb _
\b*_
\bb_
\bu_
\bf);
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
T
\bTh
\bhe
\bes
\bse
\be i
\bin
\bnt
\bte
\ber
\brf
\bfa
\bac
\bce
\bes
\bs a
\bar
\bre
\be o
\bob
\bbs
\bso
\bol
\ble
\bet
\bte
\bed
\bd b
\bby
\by i
\bio
\boc
\bct
\btl
\bl(
\b(2
\b2)
\b).
\b. T
\bTh
\bhe
\bey
\by a
\bar
\bre
\be a
\bav
\bva
\bai
\bil
\bla
\bab
\bbl
\ble
\be f
\bfr
\bro
\bom
\bm t
\bth
\bhe
\be
c
\bco
\bom
\bmp
\bpa
\bat
\bti
\bib
\bbi
\bil
\bli
\bit
\bty
\by l
\bli
\bib
\bbr
\bra
\bar
\bry
\by,
\b, l
\bli
\bib
\bbc
\bco
\bom
\bmp
\bpa
\bat
\bt.
\b.
The s
\bst
\btt
\bty
\by() function sets the state of the terminal associated with _
\bf_
\bd.
The g
\bgt
\btt
\bty
\by() function retrieves the state of the terminal associated with
_
\bf_
\bd. To set the state of a terminal the call must have write permission.
The s
\bst
\btt
\bty
\by() call is actually `ioctl(fd, TIOCSETP, buf)', while the g
\bgt
\btt
\bty
\by()
call is `ioctl(fd, TIOCGETP, buf)'. See ioctl(2) and tty(4) for an expla-
D
\bDI
\bIA
\bAG
\bGN
\bNO
\bOS
\bST
\bTI
\bIC
\bCS
\bS
If the call is successful 0 is returned, otherwise -1 is returned and the
global variable _
\be_
\br_
\br_
\bn_
\bo contains the reason for the failure.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
The s
\bst
\btt
\bty
\by() and g
\bgt
\btt
\bty
\by() functions appeared in 4.2BSD.
4.2 Berkeley Distribution June 4, 1993 1