[Python-bugs-list] [ python-Bugs-595919 ] popenN return only text mode pipes

noreply@sourceforge.net noreply@sourceforge.net
Fri, 16 Aug 2002 04:03:10 -0700


Bugs item #595919, was opened at 2002-08-16 09:25
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595919&group_id=5470

Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Boyan Boyadjiev (bbboyadjiev)
Assigned to: Nobody/Anonymous (nobody)
Summary: popenN return only text mode pipes

Initial Comment:
The functions popen2, popen3 & popen 4 (module 
win32pipe) will return only text mode pipes even 
if the parameter mode is 'b'.

In the file win32popen.cpp on lines 363 
(popen2&popen4) and 398 (popen3) can be found 
the following code:
if (mode && _O_TEXT)
    {
      m1="r";
      m2="w";
    }
      else
    {
      m1="rb";
      m2="wb";
    }
The following change solves the problem :
if (mode & _O_TEXT)
    { ....



----------------------------------------------------------------------

>Comment By: Boyan Boyadjiev (bbboyadjiev)
Date: 2002-08-16 11:03

Message:
Logged In: YES 
user_id=595971

The same code (if (mode && _O_TEXT) ...) is used also in the function _PyPopen of the posix module 
(posixmodule.c).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595919&group_id=5470