aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/io/console/console.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a6f7a489b..587823bc38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Feb 22 19:07:31 2014 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/io/console/console.c (console_dev): need read access for conout$
+ because some functions need it. [Bug#9554]
+
Sat Feb 22 18:40:58 2014 Eric Wong <e@80x24.org>
* .gitignore: ignore benchmark files
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index f3379ffd8d..de5ca82558 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -710,7 +710,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);