Patch for socket accept problem

David Shaffer cdshaffer at
Mon Aug 22 23:46:59 UTC 2005

Attached is a diff file which fixes the problem with Squeak's accept()
usage under UNIX.  You should be able to apply this to your
Squeak-3.8a-1 VM source tree (from Ian's site) by cd-ing into
"platforms/unix/plugins/SocketPlugin" and executing:

patch sqUnixSocket.c /path/to/diff/sqUnixSocket.diff

then rebuild and install your VM.  Read my previous posting to this list
to see what problems this fixes.  The original VM code missed
connections when several requests arrive in a short burst (some browsers
brought out this problem when they requested images, style sheets etc in
separate HTTP requests).  With this patch that problem is fixed.  Still,
under very high load you eventually run out of file descriptors for the
new sockets (Linux limits you to 1024, no matter what ulimit you set)
and then things still go wrong as they did with the original
happens faster with this patch, though, since you aren't missing
incoming connections.  This patch is just a first step but I highly
recommend it for UNIX-based Squeak servers.

I am using this patch in my production image.  So far (24 hours) no


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixSocket.diff
Type: text/x-patch
Size: 7049 bytes
Desc: not available
Url :

More information about the Squeak-dev mailing list