summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-01 15:38:53 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-01 15:38:53 +0000
commit49b4510cd1ca220e9ec51ad269c6544ca9610ca3 (patch)
tree987b6fd34dfecb401604ee2e27e24df9daf7b676 /ext
parent4d88169267a8614c36e9fbe389dd3fadba25cdc5 (diff)
* ext/socket/init.c (rsock_connect): add to care EINTR. based
on a patch from Eric Wong at [ruby-core:35621][Bug #4555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 137027a..ee88e81 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -383,6 +383,12 @@ rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
status = (int)BLOCKING_REGION_FD(func, &arg);
if (status < 0) {
switch (errno) {
+ case EINTR:
+#if defined(ERESTART)
+ case ERESTART:
+#endif
+ continue;
+
case EAGAIN:
#ifdef EINPROGRESS
case EINPROGRESS: