This replacement emx.dll is intended for use with the Apache web server. It 
fixes two problems:

1) emx.dll contains a fixed size array that is used to keep track of dlls 
   loaded by the process so that fork() can correctly duplicate the process.
   When a large number of Apache modules are loaded this array runs out of 
   space causing the error 
   "[error] (12)Not enough memory: fork: Unable to fork new process"
   in the error log. To work around this I've simply doubled the size of the
   array.

2) Under certain circumstances file handles are being leaked (opened but never
   closed) leading to errors like
   "[error] (24)Too many open files: accept: (client socket)"
   I've yet to find the exact cause but it appears to be something obscure 
   inside the OS/2 TCP/IP stack related to using select() on a socket that's
   been shutdown(). The OS/2 socket becomes closed all by itself causing the
   close() call to fail and leaving the EMX file descriptor allocated. My 
   work-around is to ignore the error that occurs when closing an already 
   closed socket so that the file descriptor gets freed.

My changes to the emx source code (from the 0.9d fix 2 source, found as 
ftp://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxsrcr.zip) is included in
the file fixes.patch.

--
Brian Havard
bjh@apache.org
