Re: File Descriptors & Linux 2.0

Miquel van Smoorenburg (miquels@drinkel.cistron.nl)
Thu, 27 Jun 1996 10:40:21 +0200 (MET DST)


In article <hpa.31d2030e.Swedes.have.more.fun@freya.yggdrasil.com>,
H. Peter Anvin <hpa@freya.yggdrasil.com> wrote:
>
>How many applications do you know that actually check if the file
>descriptor they get from the kernel is in the range 0 <= fd < NR_OPEN?
>Most apps just use FD_SET() without any further checking.
>

You could set NR_OPEN to 1024 and set the rlim[RLIMIT_NOFILE] to
256 for compatibility.. Programs that want to use the larger fd_set
can then increase the rlimit themselves.

I want to experiment with this myself in the near future; we
have a machine with a dedicated squid wwwcache running and very
soon 256 fds will not be enough.

Mike.

--
+ Miquel van Smoorenburg   + Cistron Internet Services +  Living is a     |
| miquels@cistron.nl (SP6) | Independent Dutch ISP     |   horizontal     |
+ miquels@drinkel.ow.org   + http://www.cistron.nl/    +      fall        +