POLL.H(7) Miscellaneous Information Manual POLL.H(7)
NAME
poll.h —
definitions for the poll() function
SYNOPSIS
#include <poll.h>
DESCRIPTION
The <poll.h> header defines the
pollfd structure that includes at least the following member:
int fd the following descriptor being polled short int events the input event flags (see below) short int revents the output event flags (see below)
The <poll.h> header defines the following type through typedef:
- nfds_t
- An unsigned integral type used for the number of file descriptors.
The following symbolic constants are defined, zero or more of which may be OR-ed together to form the events or revents members in the pollfd structure:
- POLLIN
- Same effect as POLLRDNORM | POLLRDBAND.
- POLLRDNORM
- Data on priority band 0 may be read.
- POLLRDBAND
- Data on priority bands greater than 0 may be read.
- POLLPRI
- High priority data may be read.
- POLLOUT
- Same value as POLLWRNORM.
- POLLWRNORM
- Data on priority band 0 may be written.
- POLLWRBAND
- Data on priority bands greater than 0 may be written. This event only examines bands that have been written to at least once.
- POLLERR
- An error has occurred ( revents only).
- POLLHUP
- Device has been disconnected ( revents only).
- POLLNVAL
- Invalid fd member ( revents only).
The <
poll.h > header
declares the following function which may also be defined as a macro.
Function prototypes must be provided for use with an ISO C compiler.
int poll(struct pollfd[], nfds_t, int);
APPLICATION USAGE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
poll(3) .
February 1997 posix.fail