aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--io.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 29e563bca2..cdb8245c80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Oct 24 00:36:47 2009 Tanaka Akira <akr@fsij.org>
+
+ * io.c (io_cntl): update max file descriptor by the result of
+ fcntl(F_DUPFD).
+
Fri Oct 23 14:25:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (target, target_alias): replace with real cpu.
diff --git a/io.c b/io.c
index 7ef11920ed..426cba5a55 100644
--- a/io.c
+++ b/io.c
@@ -7237,6 +7237,9 @@ io_cntl(int fd, unsigned long cmd, long narg, int io_p)
# else
retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, (int)cmd, narg);
# endif
+ if (!io_p && retval != -1 && cmd == F_DUPFD) {
+ UPDATE_MAXFD(retval);
+ }
#else
if (!io_p) {
rb_notimplement();