diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-23 07:40:56 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-23 07:40:56 +0000 |
commit | f8522d0cd02834bdc37a672a9943c7eedb87fa24 (patch) | |
tree | dab5f0199c85935ae9abe3e3df922a7bb6611a7c | |
parent | 4de0a4104884653a8f02e2db4fe4adb348ae96b0 (diff) | |
download | ruby-f8522d0cd02834bdc37a672a9943c7eedb87fa24.tar.gz ruby-f8522d0cd02834bdc37a672a9943c7eedb87fa24.tar.xz ruby-f8522d0cd02834bdc37a672a9943c7eedb87fa24.zip |
rescue Errno::EWOULDBLOCK as well as Errno::EAGAIN in sample code in rdoc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/socket/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index c141e6be3..29fa71f8a 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1548,7 +1548,7 @@ tcp_accept(VALUE sock) * serv = TCPServer.new(2202) * begin * sock = serv.accept_nonblock - * rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR * IO.select([serv]) * retry * end @@ -2112,7 +2112,7 @@ unix_accept(VALUE sock) * serv = UNIXServer.new("/tmp/sock") * begin * sock = serv.accept_nonblock - * rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR * IO.select([serv]) * retry * end @@ -2841,7 +2841,7 @@ sock_recvfrom(int argc, VALUE *argv, VALUE sock) * client, client_sockaddr = socket.accept * begin * pair = client.recvfrom_nonblock(20) - * rescue Errno::EAGAIN + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK * IO.select([client]) * retry * end @@ -2909,7 +2909,7 @@ sock_accept(VALUE sock) * socket.listen(5) * begin * client_socket, client_sockaddr = socket.accept_nonblock - * rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR * IO.select([socket]) * retry * end |