summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-23 14:58:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-23 14:58:47 +0000
commitf9adadc5e610360850b3a4bd9a43e928d1c78bb1 (patch)
treec4e34627f259595f6a990c9326ba104dfedfbbf8 /ext/socket/ancdata.c
parentf4166e2dd7a4d9be95f160e19303ddeeb5d27ab4 (diff)
rb_readwrite_syserr_fail
* io.c (rb_readwrite_syserr_fail): works with the given errno than thread local errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index b19f605..02766ba 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1285,8 +1285,8 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
if (ex == Qfalse) {
return sym_wait_writable;
}
- rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE,
- "sendmsg(2) would block");
+ rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
+ "sendmsg(2) would block");
}
rb_syserr_fail(e, "sendmsg(2)");
}
@@ -1559,7 +1559,7 @@ bsock_recvmsg_internal(VALUE sock,
if (ex == Qfalse) {
return sym_wait_readable;
}
- rb_readwrite_sys_fail(RB_IO_WAIT_READABLE, "recvmsg(2) would block");
+ rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE, e, "recvmsg(2) would block");
}
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
if (!gc_done && (e == EMFILE || e == EMSGSIZE)) {