IOCTL(S) XENIX System V IOCTL(S)
Name
ioctl - Controls character devices.
Syntax
#include <sys/ioctl.h>
int ioctl(fildes, request, arg)
int fildes;
Description
ioctl performs a variety of functions on character special
files (devices). The arguments request and arg depend on
which device ioctl is being applied to. The writeups of
various devices in Section M discuss how ioctl applies to
them.
ioctl fails if one or more of the following are true:
A signal is caught during ioctl system call. [EINTR]
fildes is not a valid open file descriptor. [EBADF]
fildes is not associated with a character special
device. [ENOTTY]
request or arg is not valid. See termio(M). [EINVAL]
A signal was caught during the ioctl system call.
[EINTR]
Return Value
If an error has occurred, a value of -1 is returned and
errno is set to indicate the error.
See Also
tty(M), termio(M)
Page 1 (printed 8/7/87)