diff --git a/man2/select.2 b/man2/select.2 index 8af03c38f..ee42ef259 100644 --- a/man2/select.2 +++ b/man2/select.2 @@ -163,7 +163,10 @@ this is useful after returns. .PP .I nfds -is the highest-numbered file descriptor in any of the three sets, plus 1. +should be set to the highest-numbered file descriptor in any +of the three sets, plus 1. +The indicated file descriptors in each set are checked, up to this limit +(but see BUGS). .PP The .I timeout @@ -328,6 +331,7 @@ becomes undefined. An invalid file descriptor was given in one of the sets. (Perhaps a file descriptor that was already closed, or one on which an error has occurred.) +However, see BUGS. .TP .B EINTR A signal was caught; see @@ -542,6 +546,18 @@ To monitor file descriptors greater than 1023, use .BR poll (2) instead. +According to POSIX, +.BR select () +should check all specified file descriptors in the three file descriptor sets, +up to the limit +.IR nfds\-1 . +However, the current implementation ignores any file descriptor in +these sets that is greater than the maximum file descriptor number +that the process currently has open. +According to POSIX, any such file descriptor that is specified in one +of the sets should result in the error +.BR EBADF . + Glibc 2.0 provided a version of .BR pselect () that did not take a