aboutsummaryrefslogtreecommitdiffstats
path: root/ext/io/console/console.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-20 13:26:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-20 13:26:10 +0000
commitb41ccc4a9c4d4900e79642bb98ad87b2ba63e766 (patch)
tree39f42db7feb39f86e952030c29de292d295f8a3b /ext/io/console/console.c
parent13f62a384b48a5e8ade2319e102a6aa31a0321c9 (diff)
downloadruby-b41ccc4a9c4d4900e79642bb98ad87b2ba63e766.tar.gz
* include/ruby/intern.h (rb_update_max_fd): declaration moved from
internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r--ext/io/console/console.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index f83f81a917..87101fea5e 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -562,6 +562,7 @@ console_dev(VALUE klass)
#ifdef CONSOLE_DEVICE_FOR_WRITING
fd = open(CONSOLE_DEVICE_FOR_WRITING, O_WRONLY);
if (fd < 0) return Qnil;
+ rb_update_max_fd(fd);
args[1] = INT2FIX(O_WRONLY);
args[0] = INT2NUM(fd);
out = rb_class_new_instance(2, args, klass);
@@ -573,6 +574,7 @@ console_dev(VALUE klass)
#endif
return Qnil;
}
+ rb_update_max_fd(fd);
args[1] = INT2FIX(O_RDWR);
args[0] = INT2NUM(fd);
con = rb_class_new_instance(2, args, klass);