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.

classification
Title: Unclear warning for subprocess.call
Type: Stage:
Components: Documentation Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: azumanga, georg.brandl, pjenvey
Priority: normal Keywords:

Created on 2009-10-20 20:20 by azumanga, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg94297 - (view) Author: Christopher Jefferson (azumanga) Date: 2009-10-20 20:20
I wandered across subprocess.call as it was mentioned as a replacement for os.system. The 
following large warning is attached to it:

Warning Like Popen.wait(), this will deadlock if the child process generates enough output to a 
stdout or stderr pipe such that it blocks waiting for the OS pipe buffer to accept more data.

This scared my off completely, and I assumed the function was simply broken, as I assumed 
"stdout pipe" just meant that wherever stdout was sent by default.

I now believe this warning only applies if 'stdout=PIPE', or similar, is used explicitally.

Could this warning be better worded, perhaps adding "if stdout or stderr are explicitly 
redirected", as in:

Warning Like Popen.wait(), if stdout or stderr are explicitly redirected this will deadlock if 
the child process generates enough output to a stdout or stderr pipe such that it blocks 
waiting for the OS pipe buffer to accept more data.
msg94314 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-10-21 17:17
Assigning to Philip who added the warning.
msg95922 - (view) Author: Philip Jenvey (pjenvey) * (Python committer) Date: 2009-12-03 02:42
Improved in r76640 / r76641 to explicitly mention this applies to 
stdout/err=PIPE
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51426
2009-12-03 02:42:48pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg95922
2009-10-21 17:17:41georg.brandlsetassignee: georg.brandl -> pjenvey

messages: + msg94314
nosy: + pjenvey
2009-10-20 20:20:03azumangacreate