IOCTL(2) DOMAIN/IX SYS5 IOCTL(2)
NAME
ioctl - control device
USAGE
#include <sys/ioctl.h>
ioctl(d, request, argp)
int d, request;
char *argp;
DESCRIPTION
Ioctl calls perform a variety of functions on open descrip-
tors. They are typically used to control the characteris-
tics of character-special files (e.g., terminals).
An ioctl request specifies whether the argument is an "in"
parameter or an "out" parameter, as well as the size of the
argument argp in bytes. Macros and definitions used in
specifying an ioctl request are in the file <sys/ioctl.h>.
NOTES
When ioctl is used in programs that deal with DOMAIN System
Display Manager pads, setting the mode to RAW has the
immediate effect of putting the pad into raw mode. Other
ioctl modes have no effect, but are stored and will be
inherited by the vt100 program if it is subsequently invoked
in that pad.
RETURN VALUE
A successful call returns zero. A failed call returns -1
and sets errno as indicated below.
ERRORS
Ioctl will fail if one or more of the following are true:
[EBADF] D is not a valid descriptor.
[ENOTTY] D is not associated with a character-special dev-
ice.
[ENOTTY] The specified request does not apply to the kind
of object that the descriptor d references.
[EINVAL] Request or argp is not valid.
RELATED INFORMATION
execve(2), fcntl(2)
Printed 12/4/86 IOCTL-1