Description of problem: On two occasions squid closes all file descriptors but the standard three. This is done by iterating over all possible descriptor values and calling close. There is a better way. Just image what the code would do if the max fd count is 16k or more. Version-Release number of selected component (if applicable): squid-2.5.STABLE6-2 How reproducible: always Steps to Reproduce: 1.strace starting squid 2. 3. Actual results: thousands of close() calls Expected results: normally none since there are no excess desriptors in use Additional info: I'll attach a patch.
Created attachment 105346 [details] Replace dumb loops with something more intelligent This works on all Linux systems. It's not portable but this is an OPP.
Upstream noticed that closing file descriptors that're being used by various libraries (ssl, syslog, etc) can Be Bad. The squid I just built into Rawhide includes a patch to correct its behavior.