[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: irc 2.11.0 fdopen bug



On Sun, Feb 13, 2005 at 09:16:34PM -0800, Chris Behrens wrote:
> Your patch will not work, either.  The limitiation is in Solaris's use of
> a 'char' for 'fd' in the FILE struct.  That means even fopen() cannot be
> used when fds 0-255 are already in use.  

Now that's a nightmare.

> The quickest kludge is to do something like this, instead:

Unfortunately it is not enough. config_read() calls fopen() recursively
on each '#include filename' directive.

> The real fix is obviously to not use 'FILE'. :)

I've been using open() and mmap(), but it had weird behaviour (crashed
with no apparent reason, probably related to config files being removed
during their generation from cron), so I dropped it in favour of fopen().

p.

-- 
Beware of he who would deny you access to information, for in his
heart he dreams himself your master.   -- Commissioner Pravin Lal
http://nerdquiz.sgh.waw.pl/  -- polska wersja quizu dla nerdów ;)