summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsmpatel <smpatel@FreeBSD.org>1996-08-20 07:26:20 +0000
committersmpatel <smpatel@FreeBSD.org>1996-08-20 07:26:20 +0000
commit60125bd1a9e42a8b02f15396ba886b417c95bbc1 (patch)
tree26f4246a3c089aeba115084348812d091e358303 /lib
parentd7c31a0d8b92c6e68e1a8b5c69c53f807232620d (diff)
downloadFreeBSD-src-60125bd1a9e42a8b02f15396ba886b417c95bbc1.zip
FreeBSD-src-60125bd1a9e42a8b02f15396ba886b417c95bbc1.tar.gz
Reflect the removal of the kernel's FD_SETSIZE limit.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/select.240
1 files changed, 21 insertions, 19 deletions
diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2
index 0fdd137..a178a01 100644
--- a/lib/libc/sys/select.2
+++ b/lib/libc/sys/select.2
@@ -140,6 +140,9 @@ before any of the selected events occurred.
.It Bq Er EINVAL
The specified time limit is invalid. One of its components is
negative or too large.
+.It Bq Er EINVAL
+.Fa nfds
+was invalid.
.El
.Sh SEE ALSO
.Xr accept 2 ,
@@ -151,30 +154,29 @@ negative or too large.
.Xr send 2 ,
.Xr write 2 ,
.Xr clocks 7
-.Sh BUGS
-Although the provision of
-.Xr getdtablesize 2
-was intended to allow user programs to be written independent
-of the kernel limit on the number of open files, the dimension
-of a sufficiently large bit field for select remains a problem.
-The default size
-.Dv FD_SETSIZE
-(currently 256) is somewhat larger than
-the current kernel limit to the number of open files.
-However, in order to accommodate programs which might potentially
-use a larger number of open files with select, it is possible
-to increase this size within a kernel by providing
-a larger definition of
+.Sh NOTES
+The default size of
.Dv FD_SETSIZE
-in kernel configuration file and rebuilding a kernel.
-To increase default limit user program must define its own
-.Dv FD_SETSIZE
-which is less or equal new kernel
+is currently 256.
+In order to accomodate programs which might potentially
+use a larger number of open files with
+.Fn select
+, it is possible
+to increase this size by having the program define
.Dv FD_SETSIZE
before the inclusion of any header which includes
.Aq Pa sys/types.h .
.Pp
-.Fn Select
+If
+.Fa nfds
+is greater than the number of open files,
+.Fn select
+is not guaranteed to examine the unused file descriptors. For historical
+reasons,
+.Fn select
+will always examine the first 256 descriptors.
+.Sh BUGS
+.Fn select
should probably return the time remaining from the original timeout,
if any, by modifying the time value in place.
This may be implemented in future versions of the system.
OpenPOWER on IntegriCloud