From: Eric Wong Date: 2014-02-19T09:32:25+00:00 Subject: [ruby-core:60865] Re: [ruby-trunk - Bug #9356] TCPSocket.new does not seem to handle INTR Eric Wong wrote: > Ah, I forget the outer for(;;) loop. Maybe it's better to not loop, > the WAIT_IN_PROGRESS stuff is confusing... I have no idea how portable this is: http://bogomips.org/ruby.git/patch?id=f5e2eb00e5 Btw, I suspect the WAIT_IN_PROGRESS stuff is carried over from the 1.8 days where all sockets were non-blocking by default, and overly complicated as a result. I don't even think EINPROGRESS/EAGAIN is possible, only EINTR/ERESTART.