--- Modules/socketmodule.c 2014-05-26 15:47:14.645677000 +1200 +++ Modules/socketmodule_fix.c 2014-05-26 15:43:42.426036000 +1200 @@ -2040,7 +2040,17 @@ internal_connect(PySocketSockObject *s, int res, timeout; timeout = 0; - res = connect(s->sock_fd, addr, addrlen); +#ifdef EINTR + while(1) { +#endif + res = connect(s->sock_fd, addr, addrlen); +#ifdef EINTR + if (res < 0 && errno == EINTR) { + continue; + } + break; + } +#endif #ifdef MS_WINDOWS