Duane Wessels wrote:
> I'm happy to put some limit in the loop. 8192? 16384?
And what is wrong with using the available interfaces (sysconf and/or
getrlimit) if available? I would not trust opening more files than these
reports even if possible (an obvious sign of a falty attemt to increase
the kernel limit beyond what the system can support, which is quite
likely to fail in various ways).
My opinion is that using such a loop is a bit to harsh, and may even
cause some of the less stable systems to crash (but that is perhaps a
good thing, as Squid probably would crash the same systems when in
production).
If I understands things correctly, the purpose of this configure test is
to find the systems upper limit of FD_SETSIZE for systems using
select(). For systems not using select() (i.e. poll) we may equally well
use runtime detection using sysconf/getrlimit instead.
You can most likely cut out all of the tests for various constants
without making anyone unhappy. And the FD_SETSIZE test I added should of
course not be done (it sort of defeats the purpose of the test...)
> I don't know about systems that don't have setrlimit().
Beleive me, there are. Especially if you look at POSIX compatible
non-UNIX systems.
There is also some exotic UNIXes without setrlimit, but I do not know of
any which anyone might dream of running Squid on (mostly historic ones,
which most likely won't surive Y2K either, or support more than 256
filedescriptors in total, or run on any decent hardware by todays
measure).
/Henrik
Received on Tue Jul 29 2003 - 13:15:57 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:05 MST