apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject [PATCH] don't overlay storage selecting on big fd
Date Mon, 26 Jan 2004 23:23:15 GMT
FD_SET is rather unfriendly if you give it a file descriptor that is >= 
FD_SETSIZE.  It will overlay storage.

Exception: Windows uses an array[FD_SETSIZE] of handles, so the value of 
individual handles is irrelevant.  I don't know what other exceptions 
there might be.

Any comments?  Yeah, the error code sucks.  APR_ENOPOLL?  APR_ENOSOCKET?

Anybody running a super-threaded httpd MPM on a box without poll()? 
Apache httpd's MPMs for Unix will stop bailing out for client 
connections using a socket fd >= FD_SETSIZE.  They do it now just in 
case the platform has no poll(), but it is doubtful that more than a 
handful of people really need that check, and hopefully an apr patch 
like this one will be sufficient to convince such people that they 
should lower the threads or otherwise reduce the fds open in the 
process.  (They had to do that anyway when httpd performed the check.)

View raw message