--- Modules/socketmodule.c	2014-05-26 15:34:57.720059000 +1200
+++ Modules/socketmodule_fix.c	2014-05-26 15:35:22.467229000 +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);
+        if (res < 0 && errno == EINTR) {
+            continue;
+        }
+        break;
+#ifdef EINTR
+    }
+#endif
 
 #ifdef MS_WINDOWS
 
