mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/init.c (s_recvfrom): use rb_io_wait_readable after
recvfrom. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ec5d31b307
commit
22cef963c3
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Feb 22 19:28:08 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/init.c (s_recvfrom): use rb_io_wait_readable after
|
||||
recvfrom.
|
||||
|
||||
Sun Feb 22 18:40:04 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/option.c (inspect_errno): new function.
|
||||
|
|
|
@ -119,6 +119,9 @@ s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
|
|||
while (rb_io_check_closed(fptr),
|
||||
rb_thread_wait_fd(arg.fd),
|
||||
(slen = BLOCKING_REGION(recvfrom_blocking, &arg)) < 0) {
|
||||
if (!rb_io_wait_readable(fptr->fd)) {
|
||||
rb_sys_fail("recvfrom(2)");
|
||||
}
|
||||
if (RBASIC(str)->klass || RSTRING_LEN(str) != buflen) {
|
||||
rb_raise(rb_eRuntimeError, "buffer string modified");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue