?? ioctl.2
字號:
.TH IOCTL 2 .SH NAMEioctl, stty, gtty \- control device.SH SYNOPSIS.B #include <sgtty.h>.PP.B ioctl(fildes, request, argp).br.B struct sgttyb *argp;.PP.B stty(fildes, argp).br.B struct sgttyb *argp;.PP.B gtty(fildes, argp).br.B struct sgttyb *argp;.SH DESCRIPTION.I Ioctlperforms a variety of functionson character special files (devices).The writeups of various devicesin section 4 discuss how.I ioctlapplies to them..PPFor certain status setting and status inquiriesabout terminal devices, the functions.I sttyand.I gttyare equivalent to.RS.B ioctl(fildes, TIOCSETP, argp).br.B ioctl(fildes, TIOCGETP, argp).RE.LPrespectively; see.IR tty (4)..PPThe following two calls, however, apply to any open file:.PP.RS.B ioctl(fildes, FIOCLEX, NULL);.br.B ioctl(fildes, FIONCLEX, NULL);.RE.LPThe first causes the file to be closed automatically duringa successful.I execoperation;the second reverses the effect of the first..SH "SEE ALSO"stty(1), tty(4), exec(2).SH DIAGNOSTICSZero is returned if the call was successful;\-1 if the file descriptor does not refer tothe kind of file for which it was intended..SH BUGSStrictly speaking,since .I ioctlmay be extended in different ways to devices withdifferent properties,.I argpshould have an open-ended declaration like.IP.B union { struct sgttyb.RB ... ;\&....B } *argp;.PPThe important thing is that the size is fixed by `struct sgttyb'..SH ASSEMBLER(ioctl = 54.).br.B sys ioctl; fildes; request; argp.PP(stty = 31.).br(file descriptor in r0).br.B stty; argp.PP(gtty = 32.).br(file descriptor in r0).br.B sys gtty; argp
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -