select.2: Show correspondence between select() and poll() readiness notifications

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-03-29 06:39:45 +02:00
parent 84ec7d432b
commit ab264bff4f
1 changed files with 24 additions and 0 deletions

View File

@ -469,6 +469,30 @@ when
.B _GNU_SOURCE
is defined.
Since glibc 2.2.2, the requirements are as shown in the SYNOPSIS.
.\"
.SS Correspondence between select() and poll() notifications
Within the Linux kernel source,
.\" fs/select.c
we find the following definitions which show the correspondence
between the readable, writable, and exceptional condition notifications of
.BR select ()
and the event notifications provided by
.BR poll (2)
(and
.BR epoll (7)):
.nf
.in +4n
#define POLLIN_SET (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP |
POLLERR)
/* Ready for reading */
#define POLLOUT_SET (POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR)
/* Ready for writing */
#define POLLEX_SET (POLLPRI)
/* Exceptional condition */
.in
.fi
.\"
.SS Multithreaded applications
If a file descriptor being monitored by
.BR select ()