From: Tim Peters Date: Mon, 19 Aug 2002 00:43:06 +0000 (+0000) Subject: SF bug 595919: popenN return only text mode pipes X-Git-Tag: v2.2.2b1~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=506d6d91b43467f343cb47c7bcd791413c7e2614;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Misc/NEWS b/Misc/NEWS index c0edcf48a900..a823bce79bc9 100644 --- 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). diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 38754e59decc..e2d511410f6a 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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 {