]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF bug 595919: popenN return only text mode pipes
authorTim Peters <tim.peters@gmail.com>
Mon, 19 Aug 2002 00:43:06 +0000 (00:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 19 Aug 2002 00:43:06 +0000 (00:43 +0000)
popen2() and popen3() created text-mode pipes even when binary mode
was asked for.  This was specific to Windows.

Misc/NEWS
Modules/posixmodule.c

index c0edcf48a900628b1ea300b01a79cc92629e8a80..a823bce79bc993894477d01bc6bff8816c865863 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,10 @@ C API
 
 Windows
 
+- 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.
+
 - Sometimes the uninstall executable (UNWISE.EXE) vanishes.  One cause
   of that has been fixed in the installer (disabled Wise's "delete in-
   use files" uninstall option).
index 38754e59decc03d1617580787addc2f84aee1488..e2d511410f6a573ef71b8cc72433caa346758b97 100644 (file)
@@ -2790,7 +2790,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 {
@@ -2822,7 +2822,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 {