ruby-changes:40648
From: normal <ko1@a...>
Date: Tue, 24 Nov 2015 07:57:35 +0900 (JST)
Subject: [ruby-changes:40648] normal:r52727 (trunk): ext/socket/init.c (rsock_accept): handle ENOMEM
normal 2015-11-24 07:57:29 +0900 (Tue, 24 Nov 2015) New Revision: 52727 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52727 Log: ext/socket/init.c (rsock_accept): handle ENOMEM accept(2) documents ENOMEM as a possible error, handle it consistent with all of our other FD-allocating wrappers. Modified files: trunk/ChangeLog trunk/ext/socket/init.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52726) +++ ChangeLog (revision 52727) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Nov 24 07:56:54 2015 Eric Wong <e@8...> + + * ext/socket/init.c (rsock_accept): handle ENOMEM + Tue Nov 24 07:50:15 2015 Eric Wong <e@8...> * dir.c (dir_initialize): use rb_gc_for_fd for ENOMEM Index: ext/socket/init.c =================================================================== --- ext/socket/init.c (revision 52726) +++ ext/socket/init.c (revision 52727) @@ -605,6 +605,7 @@ rsock_s_accept(VALUE klass, int fd, stru https://github.com/ruby/ruby/blob/trunk/ext/socket/init.c#L605 switch (errno) { case EMFILE: case ENFILE: + case ENOMEM: if (retry) break; rb_gc(); retry = 1; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/