summaryrefslogtreecommitdiff
path: root/ext/io/console
diff options
context:
space:
mode:
Diffstat (limited to 'ext/io/console')
-rw-r--r--ext/io/console/console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index e7983bbcb9a..72f507210cb 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -564,7 +564,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);
+ rb_fd_set_cloexec(fd);
args[1] = INT2FIX(O_WRONLY);
args[0] = INT2NUM(fd);
out = rb_class_new_instance(2, args, klass);
@@ -576,7 +576,7 @@ console_dev(VALUE klass)
#endif
return Qnil;
}
- rb_update_max_fd(fd);
+ rb_fd_set_cloexec(fd);
args[1] = INT2FIX(O_RDWR);
args[0] = INT2NUM(fd);
con = rb_class_new_instance(2, args, klass);