[ python-Bugs-1227748 ] subprocess: inheritance of std descriptors inconsistent

SourceForge.net noreply at sourceforge.net
Sun Jun 26 15:37:33 CEST 2005


Bugs item #1227748, was opened at 2005-06-26 15:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1227748&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: André Malo (ndparker)
Assigned to: Nobody/Anonymous (nobody)
Summary: subprocess: inheritance of std descriptors inconsistent

Initial Comment:
The inheritance of std descriptors is inconsistent
between Unix and Windows implementations.

If one calls Popen with stdin = stdout = stderr = None,
the caller's std descriptors are inherited on *x, but
not on Windows, because of the following optimization
(from subprocess.py r1.20):

   655	        def _get_handles(self, stdin, stdout,
stderr):
   656	            """Construct and return tupel with
IO objects:
   657	            p2cread, p2cwrite, c2pread,
c2pwrite, errread, errwrite
   658	            """
   659	            if stdin is None and stdout is None
and stderr is None:
   660	                return (None, None, None, None,
None, None)
   661	

I suggest to just remove those lines 659 and 660. The
current workaround is to duplicate the handles by the
application and supply an own STARTUPINFO structure.

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

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


More information about the Python-bugs-list mailing list