epoll_wait.2, poll.2, select.2: Go into more detail on timeout and when call will cease blocking

Reported-by: Network Nut <sillystack@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-01-31 07:47:22 +01:00
parent 182673cff7
commit 40df3d0039
3 changed files with 37 additions and 7 deletions

View File

@ -19,7 +19,7 @@
.\"
.\" 2007-04-30: mtk, Added description of epoll_pwait()
.\"
.TH EPOLL_WAIT 2 2014-01-29 "Linux" "Linux Programmer's Manual"
.TH EPOLL_WAIT 2 2014-01-31 "Linux" "Linux Programmer's Manual"
.SH NAME
epoll_wait, epoll_pwait \- wait for an I/O event on an epoll file descriptor
.SH SYNOPSIS
@ -55,9 +55,19 @@ The
argument specifies the number of milliseconds that
.BR epoll_wait ()
will block.
(This interval will be rounded up to the system clock granularity,
The call will block until either:
.IP * 3
a file descriptor delivers an event;
.IP *
the call is interrupted by a signal handler; or
.IP *
the timout expires.
.PP
Note that the
.I timeout
interval will be rounded up to the system clock granularity,
and kernel scheduling delays mean that the blocking interval
may overrun by a small amount.)
may overrun by a small amount.
Specifying a
.I timeout
of \-1 causes

View File

@ -28,7 +28,7 @@
.\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
.\" formatting changes.
.\"
.TH POLL 2 2013-11-08 "Linux" "Linux Programmer's Manual"
.TH POLL 2 2014-01-31 "Linux" "Linux Programmer's Manual"
.SH NAME
poll, ppoll \- wait for some event on a file descriptor
.SH SYNOPSIS
@ -128,7 +128,17 @@ The
argument specifies the number of milliseconds that
.BR poll ()
should block waiting for a file descriptor to become ready.
This interval will be rounded up to the system clock granularity,
The call will block until either:
.IP * 3
a file descriptor becomes ready;
.IP *
the call is interrupted by a signal handler; or
.IP *
the timout expires.
.PP
Note that the
.I timeout
interval will be rounded up to the system clock granularity,
and kernel scheduling delays mean that the blocking interval
may overrun by a small amount.
Specifying a negative value in

View File

@ -35,7 +35,7 @@
.\" 2005-03-11, mtk, modified pselect() text (it is now a system
.\" call in 2.6.16.
.\"
.TH SELECT 2 2014-01-24 "Linux" "Linux Programmer's Manual"
.TH SELECT 2 2014-01-31 "Linux" "Linux Programmer's Manual"
.SH NAME
select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \-
synchronous I/O multiplexing
@ -162,7 +162,17 @@ The
argument specifies the interval that
.BR select ()
should block waiting for a file descriptor to become ready.
This interval will be rounded up to the system clock granularity,
The call will block until either:
.IP * 3
a file descriptor becomes ready;
.IP *
the call is interrupted by a signal handler; or
.IP *
the timout expires.
.PP
Note that the
.I timeout
interval will be rounded up to the system clock granularity,
and kernel scheduling delays mean that the blocking interval
may overrun by a small amount.
If both fields of the