summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-22 22:34:20 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-22 22:34:20 +0000
commit3ef6ba3d12909dbdd58c4570fc76f6fd802fb4db (patch)
treec1d9d5b3ec8dfb7a8893206f9a3a460398de87f5 /ext
parent078a760999a4ee00f59db3f07047070e71316e13 (diff)
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
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 38911c46d7..5f4fe6abe8 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -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);