summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujal Patel <smpatel@FreeBSD.org>1996-08-20 07:26:20 +0000
committerSujal Patel <smpatel@FreeBSD.org>1996-08-20 07:26:20 +0000
commit1bbb22c82e47dbc805e523be5e2fe3d4436761e0 (patch)
tree26f4246a3c089aeba115084348812d091e358303
parent4c6acd9e47736679e765ea5a8c010fdadb264237 (diff)
Notes
-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 0fdd13732d437..a178a01471043 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.