Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 1998 10:17:41 -0700
From:      Nate Williams <nate@mt.sri.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        nate@mt.sri.com (Nate Williams), hackers@FreeBSD.ORG
Subject:   Re: Supporting more than FD_SETSIZE fd's
Message-ID:  <199811111717.KAA17248@mt.sri.com>
In-Reply-To: <199811110825.BAA06296@usr02.primenet.com>
References:  <199811091734.KAA04752@mt.sri.com> <199811110825.BAA06296@usr02.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <sys/types.h>.  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811111717.KAA17248>