add reason for accept(2) failure in accept_nonblock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
078a760999
commit
3ef6ba3d12
@ -2785,9 +2785,8 @@ sock_accept_nonblock(sock)
|
|||||||
GetOpenFile(sock, fptr);
|
GetOpenFile(sock, fptr);
|
||||||
rb_io_set_nonblock(fptr);
|
rb_io_set_nonblock(fptr);
|
||||||
fd2 = accept(fptr->fd, (struct sockaddr*)buf, &len);
|
fd2 = accept(fptr->fd, (struct sockaddr*)buf, &len);
|
||||||
|
|
||||||
if (fd2 < 0) {
|
if (fd2 < 0) {
|
||||||
rb_sys_fail(0);
|
rb_sys_fail("accept(2)");
|
||||||
}
|
}
|
||||||
sock2 = init_sock(rb_obj_alloc(rb_cSocket), fd2);
|
sock2 = init_sock(rb_obj_alloc(rb_cSocket), fd2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user