1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/ancdata.c (bsock_recvmsg_internal): don't call

discard_cmsg_resource when EMFILE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-02-21 16:53:30 +00:00
parent ad2f293d4f
commit 60f2cec646
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sun Feb 22 01:52:30 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (bsock_recvmsg_internal): don't call
discard_cmsg_resource when EMFILE.
Sun Feb 22 01:48:51 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (bsock_recvmsg_internal): gc when SCM_RIGHTS

View file

@ -1301,7 +1301,6 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
if (errno == EMFILE && !gc_done) {
/* SCM_RIGHTS hit the file descriptors limit, maybe. */
gc_and_retry:
discard_cmsg_resource(&mh);
rb_gc();
gc_done = 1;
goto retry;
@ -1323,8 +1322,10 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
mh.msg_controllen < maxctllen - BIG_ENOUGH_SPACE) {
/* there are big space bug truncated.
* file descriptors limit? */
if (!gc_done)
if (!gc_done) {
discard_cmsg_resource(&mh);
goto gc_and_retry;
}
}
else {
maxctllen *= 2;