aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win32/win32.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bd4a113c08..6803a7d48c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 28 19:00:51 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_pipe_exec): internal fds should be always
+ binmode.
+
Tue Oct 28 17:21:18 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* tool/make-snapshot.rb: merged from ruby_1_9_1.
diff --git a/win32/win32.c b/win32/win32.c
index c3a5c8c5dd..13642afa27 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -764,9 +764,8 @@ rb_w32_pipe_exec(const char *cmd, const char *prog, int mode, int *pipe,
reading = TRUE;
writing = FALSE;
}
- mode &= ~(O_RDWR|O_RDONLY|O_WRONLY);
- if (!(mode & O_BINARY))
- mode |= O_TEXT;
+ mode &= ~(O_RDWR|O_RDONLY|O_WRONLY|O_TEXT);
+ mode |= O_BINARY;
sa.nLength = sizeof (SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;