.\"
.\" 2007-04-30: mtk, Added description of epoll_pwait()
.\"
-.TH EPOLL_WAIT 2 2012-08-17 "Linux" "Linux Programmer's Manual"
+.TH EPOLL_WAIT 2 2014-08-19 "Linux" "Linux Programmer's Manual"
.SH NAME
epoll_wait, epoll_pwait \- wait for an I/O event on an epoll file descriptor
.SH SYNOPSIS
The
.I timeout
-argument specifies the minimum number of milliseconds that
+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 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
.I timeout
of \-1 causes
The
.I struct epoll_event
-is defined as :
+is defined as:
.sp
.in +4n
.nf
.I data
of each returned structure will contain the same data the user set with an
.BR epoll_ctl (2)
-.RB ( EPOLL_CTL_ADD , EPOLL_CTL_MOD )
+.RB ( EPOLL_CTL_ADD ", " EPOLL_CTL_MOD )
while the
.I events
member will contain the returned event bit field.
is not accessible with write permissions.
.TP
.B EINTR
-The call was interrupted by a signal handler before either any of the
-requested events occurred or the
+The call was interrupted by a signal handler before either (1) any of the
+requested events occurred or (2) the
.I timeout
expired; see
.BR signal (7).
.I HZ
value is 1000,
this means that timeouts greater than 35.79 minutes are treated as infinity.
+.SS C library/kernel ABI differences
+The raw
+.BR epoll_pwait ()
+system call has a sixth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the
+.IR sigmask
+argument.
+The glibc
+.BR epoll_pwait ()
+wrapper function specifies this argument as a fixed value
+(equal to
+.IR sizeof(sigset_t) ).
.SH SEE ALSO
.BR epoll_create (2),
.BR epoll_ctl (2),
.BR epoll (7)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.