⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ioctl.2

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -