This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author max
Recipients max
Date 2017-05-26.17:42:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495820561.33.0.197241379069.issue30488@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation states that subprocess.STDOUT is:

Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output.

However, when Popen is called with stdout=None, stderr=subprocess.STDOUT, stderr is not redirected to stdout and continues to be sent to stderr.

To reproduce the problem:

$ python >/dev/null -c 'import subprocess;\
                        subprocess.call(["ls", "/404"],stderr=subprocess.STDOUT)'

and observe the error message appearing on the console (assuming /404 directory does not exist).

This was reported on SO 5 years ago: https://stackoverflow.com/questions/11495783/redirect-subprocess-stderr-to-stdout.

The SO attributed this to a documentation issue, but arguably it should be considered a bug because there seems to be no reason to make subprocess.STDOUT unusable in this very common use case.
History
Date User Action Args
2017-05-26 17:42:41maxsetrecipients: + max
2017-05-26 17:42:41maxsetmessageid: <1495820561.33.0.197241379069.issue30488@psf.upfronthosting.co.za>
2017-05-26 17:42:41maxlinkissue30488 messages
2017-05-26 17:42:41maxcreate