diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:52:27 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:52:27 +0000 |
commit | ac503968956c25e68d76fc5e60414c281898e2ea (patch) | |
tree | c0d43775f83b324c017177eb0aad7f42520ee5fc /io.c | |
parent | d7d96cdfe8cafc909750ea2e3faff7629d9b9460 (diff) |
merges r25446 and r25466 from trunk into ruby_1_9_1.
--
* io.c (io_cntl): update max file descriptor by the result of
fcntl(F_DUPFD).
--
* io.c (io_cntl): F_DUPFD is platform dependent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6708,6 +6708,11 @@ io_cntl(int fd, int cmd, long narg, int io_p) # else retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg); # endif +# if defined(F_DUPFD) + if (!io_p && retval != -1 && cmd == F_DUPFD) { + UPDATE_MAXFD(retval); + } +# endif #else if (!io_p) { rb_notimplement(); |