From 81a25a92573c534ca237cab8be05ee13f14afbf5 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 30 Dec 1996 14:59:12 +0000 Subject: Remove our code that clamped the max select() fd number to FD_SETSIZE (256) This function is now unused. --- lib/libc/rpc/rpc_dtablesize.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'lib/libc/rpc') 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); } -- cgit v1.1