#include
int ioctl(int fildes, int request, ...);
The
- Sockets
- Console devices
- Communication port devices
Refer to the device-specific reference page listed in the section for specific information on the
The following generic requests are supported as well:
- FIOCLEX
-
The call ioctl(fildes, FIOCLEX, NULL) is equivalent to:
fcntl(fildes, F_SETFD, FD_CLOEXEC)
- FIONCLEX
-
The call ioctl(fildes, FIONCLEX, NULL) is equivalent to:
fcntl(fildes, F_SETFD, 0)
- fildes
-
Specifies an open file descriptor that refers to a device.
- request
-
Specifies the control function to be performed based upon the device being addressed.
- ...
-
An optional third parameter (arg) for request-specific information. The data type depends upon the particular control request, but it is either an int or a pointer to a device-specific data structure.
If successful,
- EBADF
-
The fildes parameter is not a valid open file descriptor.
- EFAULT
-
The request parameter requires a data transfer to or from a buffer that arg points to, but this pointer is invalid.
- EINTR
-
A signal interrupted the call.
- EINVAL
-
request or arg is not valid for this device.
- EIO
-
Some physical I/O error has occurred.
- ENOTTY
-
fildes is not associated with a device driver that accepts control functions.
- ENXIO
-
The request and arg parameters are valid for this device driver, but the service requested cannot be performed on this particular subdevice.
UNIX 98, with exceptions.
MT-Safe.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- Miscellaneous:
- /dev/com, /dev/console,
MKS Toolkit 9.1 Documentation Build 7.