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:
akr 2006-05-22 22:34:20 +00:00
parent 078a760999
commit 3ef6ba3d12

View File

@ -2785,9 +2785,8 @@ sock_accept_nonblock(sock)
GetOpenFile(sock, fptr);
rb_io_set_nonblock(fptr);
fd2 = accept(fptr->fd, (struct sockaddr*)buf, &len);
if (fd2 < 0) {
rb_sys_fail(0);
rb_sys_fail("accept(2)");
}
sock2 = init_sock(rb_obj_alloc(rb_cSocket), fd2);