summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-12-30 14:59:12 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-12-30 14:59:12 +0000
commitc8df2bbd52cf31d137e872704d2483e5f07a3aa0 (patch)
tree1ee2f927a4bec6808a4b72a2427b614f45ae7450 /lib
parentaa8b4ee3140888808b0d161ac4d90c5c4cc2d7a5 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/rpc_dtablesize.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/libc/rpc/rpc_dtablesize.c b/lib/libc/rpc/rpc_dtablesize.c
index 330d0829540b..7df2e43857d6 100644
--- a/lib/libc/rpc/rpc_dtablesize.c
+++ b/lib/libc/rpc/rpc_dtablesize.c
@@ -40,25 +40,12 @@ static char *rcsid = "rpc_dtablesize.c,v 1.1 1994/08/07 18:36:02 wollman Exp";
* Cache the result of getdtablesize(), so we don't have to do an
* expensive system call every time.
*/
-/*
- * XXX In FreeBSD 2.x, you can have the maximum number of open file
- * descriptors be greater than FD_SETSIZE (which us 256 by default).
- * This can lead to many RPC functions getting back an EINVAL from
- * select() and bombing all over the place.
- *
- * You can apparently get select() to handle values larger than 256
- * by patching the kernel, but most people aren't likely to know
- * that. Clamping this function at 256 is a kludge, but it'll have to
- * do until select()'s descriptor table size can be adjusted dynamically.
- */
-int _rpc_dtablesize(void)
+int
+_rpc_dtablesize()
{
static int size;
- if (size == 0) {
+ if (size == 0)
size = getdtablesize();
- if (size > FD_SETSIZE)
- size = FD_SETSIZE;
- }
return (size);
}