The infamous to-do list
aidan at panix.com
Sun Jun 25 16:55:59 UTC 2000
On Sat, Jun 24, 2000 at 11:55:44PM, Russ Allbery said:
> >> * Currently, if open returns a file descriptor higher than select can
> >> handle (such as on a Solaris system where the maximum file descriptor
> >> limit has been increased above 1024 in /etc/system), INN will crash in a
> >> fairly nasty fashion. It may be possible to check this by comparing
> >> with FD_SETSIZE.
> > What about having INN maintain the FD numbers itself, using dup2()?
> > it's hard to make syslog() cooperate, but there are assumptions you can
> > (probably) make that can allow it...
> Note sure what you mean here. INN already does something similar to this
> to move file descriptors used by stdio below 256 and thereby keeps file
> descriptors for other sorts of things at higher numbers. The problem here
> is that select allows only 1024 file descriptors on some platforms even if
> the hard limit is higher than that, and it simply cannot handle any file
> descriptor numbered higher than that.
Actually, I've changed my mind about how to implement this for INN...
Now, I think you can handle this easily by doing a
getrlimit(RLIMIT_NOFILE), compare that against FD_SETSIZE, and if it's
higher, a setrlimit(RLIMIT_NOFILE, FD_SETSIZE).
Aidan Cully "Specialists without spirit, sensualists without heart;
Not Panix Staff this nullity imagines that it has attained a level of
aidan at panix.com civilization never before achieved." -- Goethe
More information about the inn-workers