lkml.org 
[lkml]   [1996]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: File Descriptors & Linux 2.0
Date
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 +



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.035 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site