Re: file descriptors for squid using linux 2.2.1

From: David Luyer <luyer@dont-contact.us>
Date: Wed, 24 Feb 1999 12:07:54 +0800

> There's a bit in main() in src/main.c of Squid 2.[12] which says:
>
> if (FD_SETSIZE < Squid_MaxFD)
> Squid_MaxFD = FD_SETSIZE;
>
> You can either comment this out (which is what I did) or hack at the
> definition for FD_SETSIZE in your header files. If you don't, Squid
> will report 1024 file descriptors.

Ugh! What a horrible suggestion (that you could just comment it out),
unless you're not using an fd_set anywhere (eg, using poll(), not using
delay_pools, etc - I don't know all the places it might be used), this would
cause a random memory scribble. FD_SETSIZE is the number of bits in the
fd_set. If you let file descriptors grow beyond it, then when bits are
toggled with FD_SET et al, this will cause random problems.

David.
Received on Tue Feb 23 1999 - 20:52:44 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:44:40 MST