summaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-28 10:01:26 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-28 10:01:26 +0000
commit3383a98be1ed993dbb9c6e749cf87890a79e5164 (patch)
treecb35ecc86c48d7c245ebe74ec9dccbed67525541 /win32
parent4d07bf4c021eb68d82ebad258403e18242b26226 (diff)
downloadruby-3383a98be1ed993dbb9c6e749cf87890a79e5164.tar.gz
ruby-3383a98be1ed993dbb9c6e749cf87890a79e5164.tar.xz
ruby-3383a98be1ed993dbb9c6e749cf87890a79e5164.zip
* win32/win32.c (rb_w32_pipe_exec): internal fds should be always
binmode. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c
index c3a5c8c5d..13642afa2 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;