ioctl, stty, gtty \- control device
.B ioctl(fildes, request, argp)
performs a variety of functions
on character special files (devices).
The writeups of various devices
For certain status setting and status inquiries
about terminal devices, the functions
.B ioctl(fildes, TIOCSETP, argp)
.B ioctl(fildes, TIOCGETP, argp)
The following two calls, however, apply to any open file:
.B ioctl(fildes, FIOCLEX, NULL);
.B ioctl(fildes, FIONCLEX, NULL);
The first causes the file to be closed automatically during
the second reverses the effect of the first.
Zero 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.
may be extended in different ways to devices with
should have an open-ended declaration like
The important thing is that the size is fixed by `struct sgttyb'.
.B sys ioctl; fildes; request; argp