SYNOPSIS
#include <unistd.h>
int ioctl(int fildes, int request, ...);
DESCRIPTION
The
Refer to the device-specific reference page listed in the SEE ALSO
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)
PARAMETERS
- 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.
RETURN VALUES
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.
CONFORMANCE
UNIX 98, with exceptions.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
fcntl()
- Miscellaneous:
- /dev/com, /dev/console, sockets
PTC MKS Toolkit 10.5 Documentation Build 40.