Query: ioctl
OS: v7
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IOCTL(2) System Calls Manual IOCTL(2)NAMEioctl, stty, gtty - control deviceSYNOPSIS#include <sgtty.h> ioctl(fildes, request, argp) struct sgttyb *argp; stty(fildes, argp) struct sgttyb *argp; gtty(fildes, argp) struct sgttyb *argp;DESCRIPTIONIoctl performs a variety of functions on character special files (devices). The writeups of various devices in section 4 discuss how ioctl applies to them. For certain status setting and status inquiries about terminal devices, the functions stty and gtty are equivalent to ioctl(fildes, TIOCSETP, argp) ioctl(fildes, TIOCGETP, argp) respectively; see tty(4). The following two calls, however, apply to any open file: ioctl(fildes, FIOCLEX, NULL); ioctl(fildes, FIONCLEX, NULL); The first causes the file to be closed automatically during a successful exec operation; the second reverses the effect of the first.SEE ALSOstty(1), tty(4), exec(2)DIAGNOSTICSZero is returned if the call was successful; -1 if the file descriptor does not refer to the kind of file for which it was intended.BUGSStrictly speaking, since ioctl may be extended in different ways to devices with different properties, argp should have an open-ended dec- laration like union { struct sgttyb ...; ... } *argp; The important thing is that the size is fixed by `struct sgttyb'.ASSEMBLER(ioctl = 54.) sys ioctl; fildes; request; argp (stty = 31.) (file descriptor in r0) stty; argp (gtty = 32.) (file descriptor in r0) sys gtty; argp IOCTL(2)
Related Man Pages |
---|
ioctl(2) - minix |
ioctl(2) - freebsd |
ioctl(2) - osx |
ioctl(2) - v7 |
ioctl(2) - ultrix |
Similar Topics in the Unix Linux Community |
---|
ioctl() fails to get window size from console login |
Using Sudo |
Using ioctl to read mice inputs |
stty error when script is called out of a cronjob |
Stty help in korn shell |