summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-12-30 14:59:12 +0000
committerpeter <peter@FreeBSD.org>1996-12-30 14:59:12 +0000
commit81a25a92573c534ca237cab8be05ee13f14afbf5 (patch)
tree1ee2f927a4bec6808a4b72a2427b614f45ae7450 /lib/libc/rpc
parentecf2da830a4a34decda104550d8c1fba0b5b421d (diff)
downloadFreeBSD-src-81a25a92573c534ca237cab8be05ee13f14afbf5.zip
FreeBSD-src-81a25a92573c534ca237cab8be05ee13f14afbf5.tar.gz
Remove our code that clamped the max select() fd number to FD_SETSIZE (256)
This function is now unused.
Diffstat (limited to 'lib/libc/rpc')
-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 330d082..7df2e43 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);
}
OpenPOWER on IntegriCloud