OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man2 / poll.2
index ba6a523..e0ed1f9 100644 (file)
@@ -28,7 +28,7 @@
 .\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
 .\"    formatting changes.
 .\"
-.TH POLL 2 2012-08-17 "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
@@ -89,12 +89,15 @@ The field
 is an input parameter, a bit mask specifying the events the application
 is interested in for the file descriptor
 .IR fd .
-If this field is specified as zero,
-then all events are ignored for
-.IR fd
-and
+This field may be specified as zero,
+in which case the only events that can be returned in
 .I revents
-returns zero.
+are
+.BR POLLHUP ,
+.BR POLLERR ,
+and
+.B POLLNVAL
+(see below).
 
 The field
 .I revents
@@ -122,12 +125,22 @@ blocks until one of the events occurs.
 
 The
 .I timeout
-argument specifies the minimum number of milliseconds that
+argument specifies the number of milliseconds that
 .BR poll ()
-will block.
-(This interval will be rounded up to the system clock granularity,
+should block waiting for a file descriptor to become ready.
+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 timeout 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 negative value in
 .I timeout
 means an infinite timeout.
@@ -364,6 +377,15 @@ See the discussion of spurious readiness notifications under the
 BUGS section of
 .BR select (2).
 .SH SEE ALSO
+.BR restart_syscall (2),
 .BR select (2),
 .BR select_tut (2),
 .BR time (7)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.