OSDN Git Service
(root)
/
linuxjm
/
LDP_man-pages.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git]
/
original
/
man2
/
poll.2
diff --git
a/original/man2/poll.2
b/original/man2/poll.2
index
f034001
..
1e7c0b2
100644
(file)
--- a/
original/man2/poll.2
+++ b/
original/man2/poll.2
@@
-28,7
+28,7
@@
.\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
.\" formatting changes.
.\"
.\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
.\" formatting changes.
.\"
-.TH POLL 2 2014-0
1-31
"Linux" "Linux Programmer's Manual"
+.TH POLL 2 2014-0
9-06
"Linux" "Linux Programmer's Manual"
.SH NAME
poll, ppoll \- wait for some event on a file descriptor
.SH SYNOPSIS
.SH NAME
poll, ppoll \- wait for some event on a file descriptor
.SH SYNOPSIS
@@
-38,6
+38,7
@@
poll, ppoll \- wait for some event on a file descriptor
.BI "int poll(struct pollfd *" fds ", nfds_t " nfds ", int " timeout );
.sp
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.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 ", "
.B #include <poll.h>
.sp
.BI "int ppoll(struct pollfd *" fds ", nfds_t " nfds ", "
@@
-82,7
+83,8
@@
file descriptor for a single
.BR poll ()
call: simply negate the
.I fd
.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
The field
.I events
@@
-165,7
+167,10
@@
There is urgent data to read (e.g., out-of-band data on TCP socket;
pseudoterminal master in packet mode has seen state change in slave).
.TP
.B POLLOUT
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,
.TP
.BR POLLRDHUP " (since Linux 2.6.17)"
Stream socket peer closed connection,
@@
-358,7
+363,7
@@
For a discussion of what may happen if a file descriptor being monitored by
.BR poll ()
is closed in another thread, see
.BR select (2).
.BR poll ()
is closed in another thread, see
.BR select (2).
-.SS
Linux not
es
+.SS
C library/kernel ABI differenc
es
The Linux
.BR ppoll ()
system call modifies its
The Linux
.BR ppoll ()
system call modifies its
@@
-372,6
+377,19
@@
Thus, the glibc
function does not modify its
.I timeout_ts
argument.
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
.SH BUGS
See the discussion of spurious readiness notifications under the
BUGS section of
@@
-381,3
+399,12
@@
BUGS section of
.BR select (2),
.BR select_tut (2),
.BR time (7)
.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/.