This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Control a device
#include <sys/ioctl.h> int ioctl( int fd, int request, ... );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The ioctl() function manipulates the underlying parameters of files. In particular, it can be used to control many of the operating attributes of files (such as the attributes of terminals).
The request argument determines whether the subsequent arguments are an "in" or "out" parameter; it also specifies the size of the arguments in bytes.
A value based on the request, or -1 if an error occurs (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |
The ioctl() function is a Unix function that varies greatly from platform to platform.