summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-08-19 00:42:29 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-08-19 00:42:29 (GMT)
commit7dca21e59fdf088cb9cc7d04f03b6fd2a7c9d509 (patch)
tree154fba31b21ead07e55a45ae4397e0db8113823c /Modules
parent5403737e3cb63c5a38acf97c9c461991e2311c57 (diff)
downloadcpython-7dca21e59fdf088cb9cc7d04f03b6fd2a7c9d509.zip
cpython-7dca21e59fdf088cb9cc7d04f03b6fd2a7c9d509.tar.gz
cpython-7dca21e59fdf088cb9cc7d04f03b6fd2a7c9d509.tar.bz2
SF bug 595919: popenN return only text mode pipes
popen2() and popen3() created text-mode pipes even when binary mode was asked for. This was specific to Windows.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9b7640f..0ce235a 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3476,7 +3476,7 @@ _PyPopen(char *cmdstring, int mode, int n)
char *m1, *m2;
PyObject *p1, *p2;
- if (mode && _O_TEXT) {
+ if (mode & _O_TEXT) {
m1 = "r";
m2 = "w";
} else {
@@ -3508,7 +3508,7 @@ _PyPopen(char *cmdstring, int mode, int n)
char *m1, *m2;
PyObject *p1, *p2, *p3;
- if (mode && _O_TEXT) {
+ if (mode & _O_TEXT) {
m1 = "r";
m2 = "w";
} else {