[issue23342] run() - unified high-level interface for subprocess

Gregory P. Smith report at bugs.python.org
Thu Jan 29 00:39:47 CET 2015


Gregory P. Smith added the comment:

Ethan: check_output combines them when stdout=subprocess.STDOUT is passed (
https://docs.python.org/3.5/library/subprocess.html#subprocess.STDOUT).
Never pass stdout=PIPE or stderr= PIPE to call() or check*() methods as
that will lead to a deadlock when a pipe buffer fills up.  check_output()
won't even allow you pass in stdout as it needs to set that to PIPE
internally, but you could still do the wrong thing and pass stderr=PIPE
without it warning you.

the documentation tells people not to do this.  i don't recall why we
haven't made it warn or raise when someone tries.  (but that should be a
separate issue/change)

On Wed Jan 28 2015 at 3:30:59 PM Ethan Furman <report at bugs.python.org>
wrote:

>
> Ethan Furman added the comment:
>
> I haven't checked the code, but does check_output and friends combine
> stdout and stderr when ouput=PIPE?
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue23342>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23342>
_______________________________________


More information about the Python-bugs-list mailing list