diff --git a/ChangeLog b/ChangeLog index 8020693eef..0adb0c008d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 16 20:36:56 2011 Tanaka Akira + + * ext/socket/ipsocket.c (init_inetsock_internal): raise an error on + listen(2) failure. + reported by Xavier Shay. [ruby-core:35505] + Wed Mar 16 15:06:21 2011 Eric Hodel * ext/openssl/lib/openssl/buffering.rb (module OpenSSL): #flush should diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c index dd7eb80b55..c01f714ce6 100644 --- a/ext/socket/ipsocket.c +++ b/ext/socket/ipsocket.c @@ -108,7 +108,7 @@ init_inetsock_internal(struct inetsock_arg *arg) status = listen(fd, 5); if (status < 0) { close(fd); - syscall = "listen(2)"; + rb_sys_fail("listen(2)"); } }