summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-22 13:13:03 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-22 13:13:03 +0000
commit53808e2323b2dd5bd677aaa8a2c655a08e58ac17 (patch)
treed1a8d512436d985b6bc3297b14957d7cf2debd2f /ext
parent1f133813d0f3da9cab10128fc0521d62ff1eb090 (diff)
merge revision(s) r45130: [Backport #9554]
* ext/io/console/console.c (console_dev): need read access for conout$ because some functions need it. [Bug#9554] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/io/console/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index cab8207ce7..270ae3deaf 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -686,7 +686,7 @@ console_dev(VALUE klass)
int fd;
#ifdef CONSOLE_DEVICE_FOR_WRITING
- fd = rb_cloexec_open(CONSOLE_DEVICE_FOR_WRITING, O_WRONLY, 0);
+ fd = rb_cloexec_open(CONSOLE_DEVICE_FOR_WRITING, O_RDWR, 0);
if (fd < 0) return Qnil;
rb_update_max_fd(fd);
args[1] = INT2FIX(O_WRONLY);