PollEvents

Possible poll event flags. See: poll(2)

Values

ValueMeaning
INPOLLIN

There is data to read.

OUTPOLLOUT

Writing is now possible, though a write larger that the available space in a socket or pipe will still block (unless O_NONBLOCK is set).

PRIPOLLPRI

There is some exceptional condition on the file descriptor. Possibilities include:

* There is out-of-band data on a TCP socket (see tcp(7)). * A pseudoterminal master in packet mode has seen a state change on the slave (see ioctl_tty(2)). * A cgroup.events file has been modified (see cgroups(7)).

ERRPOLLERR

Error condition (only returned in revents; ignored in events). * This bit is also set for a file descriptor referring to the * write end of a pipe when the read end has been closed.

NVALPOLLNVAL

Invalid request: fd not open (only returned in revents; ignored in events).

RDNORMPOLLRDNORM

Equivalent to POLLIN.

RDBANDPOLLRDBAND

Priority band data can be read (generally unused on Linux).

WRNORMPOLLWRNORM

Equivalent to POLLOUT.

WRBANDPOLLWRBAND

Priority data may be written.

HUPPOLLHUP

Hang up (only returned in revents; ignored in events). Note that when reading from a channel such as a pipe or a stream socket, this event merely indicates that the peer closed its end of the channel. Subsequent reads from the channel will return 0 (end of file) only after all outstanding data in the channel has been consumed.

Meta