httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject Re: getting that stupid solaris bug fixed
Date Thu, 19 Sep 1996 17:30:32 GMT
	Thanks, this should help. I've fwd'd this to him. (SunSoft is
making a big deal of solaris 2.5.1 being great for webservers, if you
haven't already heard. They put sockets back in the kernel, even.)

> The root cause of the bug is that the FILE structure uses an unsigned
> char to store the descriptor.  A quick check of the systems here shows
> that Digital Unix uses a short, which is good up to 32K descriptors per
> process; HP-UX uses a weird structure which has separate 'char' members
> for the low byte and the high byte of the descriptor; it, too, could
> accomodate at least 32K of 'em, at least to judge by the data structure.
> (I haven't actually written a program which opens more than 256 FILE*'s,
> and verified that they're all distinct and they all work, but given 
> these layouts, you'd have to work very hard to break it).
> 
> SGI has an #ifdef in its stdio.h --- it's broken in 32-bit mode, but
> uses an 'int' in 64-bit mode.
> 
> (NB I said 32K descriptors per process and not 64K, because it is easy
> to lose half the available descriptor space by treating the descriptors
> as signed --- which sunos does, limiting its stdio to the low 128 possible
> descriptors).
> 
> rst
> 


-- 
Sameer Parekh					Voice:   510-986-8770
C2Net						FAX:     510-986-8777
The Internet Privacy Provider
http://www.c2.net/				sameer@c2.net

Mime
View raw message