Errno::EAFNOSUPPORT

On my Arch Linux machine, TCPSocket (in the running? method of spork_instance.rb) throws a Errno::EAFNOSUPPORT instead of a Errno::ECONNREFUSED exception when Spork has not started yet.

In other words, running? should also return false when a Errno::EAFNOSUPPORT is thrown.

Alternatively, you can pass '127.0.0.1' instead of 'localhost' into TCPSocket.new.