Set or clear nonblocking I/O
#include <sys/ioctl.h> #define FIONBIO _IOW('f', 126, int)
Argument | Value |
---|---|
fd | A file descriptor that you obtained by opening the device |
request | FIONBIO |
Additional argument | A pointer to an int |
This command sets or clears non-blocking I/O. It's implemented as a call to fcntl() with a command of F_GETFL (which becomes a DCMD_ALL_GETFLAGS devctl() command), followed by a call to fcntl() with a command of F_SETFL (which becomes a DCMD_ALL_SETFLAGS devctl() command), setting or clearing O_NONBLOCK.
Zero to clear O_NONBLOCK, or nonzero to set it.
None.