From owner-freebsd-hackers Wed Nov 11 09:18:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA09135 for freebsd-hackers-outgoing; Wed, 11 Nov 1998 09:18:02 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA09073 for ; Wed, 11 Nov 1998 09:18:00 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id KAA25715; Wed, 11 Nov 1998 10:17:42 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id KAA17248; Wed, 11 Nov 1998 10:17:41 -0700 Date: Wed, 11 Nov 1998 10:17:41 -0700 Message-Id: <199811111717.KAA17248@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Terry Lambert Cc: nate@mt.sri.com (Nate Williams), hackers@FreeBSD.ORG Subject: Re: Supporting more than FD_SETSIZE fd's In-Reply-To: <199811110825.BAA06296@usr02.primenet.com> References: <199811091734.KAA04752@mt.sri.com> <199811110825.BAA06296@usr02.primenet.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I need to support more than the default 255 FD's in an application (the > > JDK for what it's worth). To be portable, the code uses fd_set as > > defined in . Unfortunately, unless I redefine FD_SETSIZE > > in every file that uses it, I still have a hard-limit on the number of > > FD's the application can use. > > > > Is there any 'portable' way of getting around this? > > Redefine FD_SETSIZE. This still gives me a hard-limit (instead of a dynamic limit) on the number of FD's in any compiled binary. > > I'd really like to > > have it use whichever open FD that the limit allows, but I know now way > > of having this happen? > > I can't really parse this. The "the limit allows" value is based on > how many contiguous bits there are in an fd_set, which is based on > the value of FD_SETSIZE at the time the fd_set is declared. I'd like to have it based on the 'getrlimit(RLIMIT_NOTFILE, &rlimit_t), which is how many the current 'process' can handle. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message