[issue22442] subprocess.check_call hangs on large PIPEd data.

Akira Li report at bugs.python.org
Mon Sep 22 06:02:52 CEST 2014


Akira Li added the comment:

Victor, the message in my patch is copied almost verbatim from the 
current subprocess' documentation [1]

[1] https://hg.python.org/cpython/file/850a62354402/Doc/library/subprocess.rst#l57

People use `call(cmd, stdout=PIPE)` as a *broken* way to suppress 
output i.e., when they actually want `call(cmd, stdout=DEVNULL)`

The issue with `call(cmd, stdout=PIPE)` that it *appears* to work
if cmd doesn't produce much output i.e., it might work in tests but
may hang in production.

It is unrelated to check_output(), getstatusouptut() or getoutput().

----------

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


More information about the Python-bugs-list mailing list