Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear warning for subprocess.call #51426

Closed
azumanga mannequin opened this issue Oct 20, 2009 · 3 comments
Closed

Unclear warning for subprocess.call #51426

azumanga mannequin opened this issue Oct 20, 2009 · 3 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@azumanga
Copy link
Mannequin

azumanga mannequin commented Oct 20, 2009

BPO 7177
Nosy @birkenfeld, @pjenvey

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/pjenvey'
closed_at = <Date 2009-12-03.02:42:48.590>
created_at = <Date 2009-10-20.20:20:03.106>
labels = ['docs']
title = 'Unclear warning for subprocess.call'
updated_at = <Date 2009-12-03.02:42:48.589>
user = 'https://bugs.python.org/azumanga'

bugs.python.org fields:

activity = <Date 2009-12-03.02:42:48.589>
actor = 'pjenvey'
assignee = 'pjenvey'
closed = True
closed_date = <Date 2009-12-03.02:42:48.590>
closer = 'pjenvey'
components = ['Documentation']
creation = <Date 2009-10-20.20:20:03.106>
creator = 'azumanga'
dependencies = []
files = []
hgrepos = []
issue_num = 7177
keywords = []
message_count = 3.0
messages = ['94297', '94314', '95922']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'pjenvey', 'azumanga']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue7177'
versions = ['Python 3.1']

@azumanga
Copy link
Mannequin Author

azumanga mannequin commented Oct 20, 2009

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.

@azumanga azumanga mannequin assigned birkenfeld Oct 20, 2009
@azumanga azumanga mannequin added the docs Documentation in the Doc dir label Oct 20, 2009
@birkenfeld
Copy link
Member

Assigning to Philip who added the warning.

@birkenfeld birkenfeld assigned pjenvey and unassigned birkenfeld Oct 21, 2009
@pjenvey
Copy link
Member

pjenvey commented Dec 3, 2009

Improved in r76640 / r76641 to explicitly mention this applies to
stdout/err=PIPE

@pjenvey pjenvey closed this as completed Dec 3, 2009
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants