ioctl(2)
_________________________________________________________________
ioctl System Call
Control device.
_________________________________________________________________
SYNTAX
#include <sys/ioctl.h>
int ioctl (fildes, command, argument)
int fildes;
int command;
int argument;
PARAMETERS
fildes A valid, active file descriptor.
command A device control command.
argument A pointer to the argument for the control command.
DESCRIPTION
Ioctl provides a variety of operations on descriptors. <Fildes>
is an active, valid descriptor. <Command> is an I/O control
command to be performed on <fildes> using <argument> as an
argument. Not all commands require an argument.
The following two commands apply to any open file. In both cases,
<argument> is ignored.
FIOCLEX
Set the `close-on-exec' attribute of <fildes>. This causes
the file to be closed upon execution of the exec operation.
FIONCLEX
Clear the `close-on-exec' attribute of <fildes>. This
causes the file to remain open across exec operations.
All other commands invoke the type manager of the object to which
<fildes> refers to perform the I/O control operation. Usually,
the object must be a character-special device.
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
ioctl(2)
ACCESS CONTROL
None.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. Errno is set to indicate the
error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EBADF <Fildes> is not a valid, active descriptor.
ENOTTY <Fildes> does not refer to a character-special
device and <command> only operates on character-
special devices.
EINVAL <Command> or <Argument> is not valid.
EINTR the call was interrupted by a signal.
Additional errors may be given by the type managers.
SEE ALSO
The related manual sections: stty(1),
exec(2), fcntl(2), socket(2),
termio(7).
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)