FILIO(4) — DEVICES AND NETWORK INTERFACES
NAME
filio − ioctls that operate directly on files, file descriptors, and sockets
SYNOPSIS
#include <sys/filio.h>
DESCRIPTION
The IOCTL’s listed in this manual page apply directly to files, file descriptors, and sockets, independent of any underlying device or protocol.
Note: the fcntl(2V) system call is the primary method for operating on file descriptors as such, rather than on the underlying files.
IOCTLS for File Descriptors
FIOCLEX The argument is ignored. Set the close-on-exec flag for the file descriptor passed to ioctl. This flag is also manipulated by the F_SETFD command of fcntl(2V).
FIONCLEX The argument is ignored. Clear the close-on-exec flag for the file descriptor passed to ioctl.
IOCTLs for Files
FIONREAD The argument is a pointer to a long. Set the value of that long to the number of immediately readable characters from whatever the descriptor passed to ioctl refers to. This works for files, pipes, sockets, and terminals.
FIONBIO The argument is a pointer to an int. Set or clear non-blocking I/O. If the value of that int is a 1 (one) the descriptor is set for non-blocking I/O. If the value of that int is a 0 (zero) the descriptor is cleared for non-blocking I/O.
FIOASYNC The argument is a pointer to an int. Set or clear asynchronous I/O. If the value of that int is a 1 (one) the descriptor is set for asynchronous I/O. If the value of that int is a 0 (zero) the descriptor is cleared for asynchronous I/O.
FIOSETOWN The argument is a pointer to an int. Set the process-group ID that will subsequently receive SIGIO or SIGURG signals for the object referred to by the descriptor passed to ioctl to the value of that int.
FIOGETOWN The argument is a pointer to an int. Set the value of that int to the process-group ID that is receiving SIGIO or SIGURG signals for the object referred to by the descriptor passed to ioctl.
SEE ALSO
ioctl(2), fcntl(2V), getsockopt(2), sockio(4)
Sun Release 4.0 — Last change: 23 November 1987