OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man2 / select.2
index 5a3017a..d4e546e 100644 (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-31 "Linux" "Linux Programmer's Manual"
+.TH SELECT 2 2015-01-22 "Linux" "Linux Programmer's Manual"
 .SH NAME
 select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \-
 synchronous I/O multiplexing
@@ -86,9 +86,10 @@ allow a program to monitor multiple file descriptors,
 waiting until one or more of the file descriptors become "ready"
 for some class of I/O operation (e.g., input possible).
 A file descriptor is considered ready if it is possible to
-perform the corresponding I/O operation (e.g.,
-.BR read (2))
-without blocking.
+perform a corresponding I/O operation (e.g.,
+.BR read (2)
+without blocking, or a sufficiently small
+.BR write (2)).
 .PP
 The operation of
 .BR select ()
@@ -131,8 +132,8 @@ available for reading (more precisely, to see if a read will not
 block; in particular, a file descriptor is also ready on end-of-file),
 those in
 .I writefds
-will be watched to see if a write will not block, and
-those in
+will be watched to see if space is available for write (though a large
+write may still block), and those in
 .I exceptfds
 will be watched for exceptions.
 On exit, the sets are modified in place
@@ -327,7 +328,13 @@ A signal was caught; see
 .TP
 .B EINVAL
 .I nfds
-is negative or the value contained within
+is negative or exceeds the
+.BR RLIMIT_NOFILE
+resource limit (see
+.BR getrlimit (2)).
+.TP
+.B EINVAL
+the value contained within
 .I timeout
 is invalid.
 .TP
@@ -347,8 +354,8 @@ conforms to POSIX.1-2001 and
 first appeared in 4.2BSD).
 Generally portable to/from
 non-BSD systems supporting clones of the BSD socket layer (including
-System V variants).
-However, note that the System V variant typically
+System\ V variants).
+However, note that the System\ V variant typically
 sets the timeout variable before exit, but the BSD variant does not.
 .PP
 .BR pselect ()
@@ -411,17 +418,16 @@ for
 and
 .BR pselect ().
 
-Libc4 and libc5 do not have a
+Under glibc 2.0,
 .I <sys/select.h>
-header; under glibc 2.0 and later this header exists.
-Under glibc 2.0 it unconditionally gives the wrong prototype for
+gives the wrong prototype for
 .BR pselect ().
-Under glibc 2.1 to 2.2.1 it gives
+Under glibc 2.1 to 2.2.1, it gives
 .BR pselect ()
 when
 .B _GNU_SOURCE
 is defined.
-Since glibc 2.2.2 the requirements are as shown in the SYNOPSIS.
+Since glibc 2.2.2, the requirements are as shown in the SYNOPSIS.
 .SS Multithreaded applications
 If a file descriptor being monitored by
 .BR select ()
@@ -438,7 +444,8 @@ closing the file descriptor in another thread has no effect on
 .BR select ().
 In summary, any application that relies on a particular behavior
 in this scenario must be considered buggy.
-.SS Linux notes
+.\"
+.SS C library/kernel ABI differences
 The
 .BR pselect ()
 interface described in this page is implemented by glibc.
@@ -588,6 +595,7 @@ main(void)
 .BR poll (2),
 .BR read (2),
 .BR recv (2),
+.BR restart_syscall (2),
 .BR send (2),
 .BR sigprocmask (2),
 .BR write (2),
@@ -596,3 +604,12 @@ main(void)
 
 For a tutorial with discussion and examples, see
 .BR select_tut (2).
+.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/.