diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-06 12:26:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-06 12:26:47 +0000 |
commit | 234753aed43d93e6a89c5ae67d8e0aba90aeef99 (patch) | |
tree | 4e1464fc207a723d53840c27c6408d357d972432 /io.c | |
parent | d95723ea9dccc43cf3d0391fe6349739f780125c (diff) |
merge revision(s) 33691,33692:
* io.c (rb_update_max_fd): fstat(2) can fail with other than
EBADF. [ruby-dev:44837] [Backport #4339]. Cf.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
EBADF. [ruby-dev:44837] [Bug #5593]. Cf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -155,7 +155,7 @@ void rb_update_max_fd(int fd) { struct stat buf; - if (fstat(fd, &buf) != 0) { + if (fstat(fd, &buf) != 0 && errno == EBADF) { rb_bug("rb_update_max_fd: invalid fd (%d) given.", fd); } if (max_file_descriptor < fd) max_file_descriptor = fd; |