.\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
.\" formatting changes.
.\"
-.TH POLL 2 2014-01-31 "Linux" "Linux Programmer's Manual"
+.TH POLL 2 2014-09-06 "Linux" "Linux Programmer's Manual"
.SH NAME
poll, ppoll \- wait for some event on a file descriptor
.SH SYNOPSIS
.BI "int poll(struct pollfd *" fds ", nfds_t " nfds ", int " timeout );
.sp
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #include <signal.h>
.B #include <poll.h>
.sp
.BI "int ppoll(struct pollfd *" fds ", nfds_t " nfds ", "
.BR poll ()
call: simply negate the
.I fd
-field.)
+field.
+Note, however, that this technique can't be used to ignore file descriptor 0.)
The field
.I events
pseudoterminal master in packet mode has seen state change in slave).
.TP
.B POLLOUT
-Writing now will not block.
+Writing is now possible, though a write larger that the available space
+in a socket or pipe will still block (unless
+.B O_NONBLOCK
+is set).
.TP
.BR POLLRDHUP " (since Linux 2.6.17)"
Stream socket peer closed connection,
.BR poll ()
is closed in another thread, see
.BR select (2).
-.SS Linux notes
+.SS C library/kernel ABI differences
The Linux
.BR ppoll ()
system call modifies its
function does not modify its
.I timeout_ts
argument.
+
+The raw
+.BR ppoll ()
+system call has a fifth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the
+.IR sigmask
+argument.
+The glibc
+.BR ppoll ()
+wrapper function specifies this argument as a fixed value
+(equal to
+.IR sizeof(sigset_t) ).
.SH BUGS
See the discussion of spurious readiness notifications under the
BUGS section of
.BR select (2),
.BR select_tut (2),
.BR time (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/.