tokuhirom/test-tcp — pull request #5 by wchristian (2012-07-28 05:05:33+00:00)
Title: fix port checking on Win32 by performing it in another process

On Win32 fork is emulating by creating another thread in the same process.
This leads to a possible bug/race condition when a server tries to open a
port and listen on it, while in the same process a client tries to connect
to the same port. This manifests by the accept call of the server failing
with an error of "Bad file descriptor".

This is easily fixed by having another process perform the port checking,
since that will not interfere with the internals.