[issue12494] subprocess: check_output() doesn't close pipes on error

2016-04-04 Thread Martin Panter
Martin Panter added the comment: As I understand it, this change only made it to 3.3+ -- nosy: +martin.panter versions: -Python 2.7, Python 3.2 ___ Python tracker ___ __

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-09-01 Thread STINNER Victor
STINNER Victor added the comment: > The second patch looks good. Tests? I don't see how to test that the pipes are closed, because the Popen object (and its stdout and stderr attributes) are not visible outside the patched functions. > I consider that this issue is a bug, so it should be fix

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 86b7f14485c9 by Victor Stinner in branch 'default': Issue #12494: Close pipes and kill process on error in subprocess functions http://hg.python.org/cpython/rev/86b7f14485c9 -- nosy: +python-dev ___ Pyth

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-09-01 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I consider that this issue is a bug, so it should be fixed in 2.7 and > 3.2. I agree that *killing* the process is a behaviour change, but we > can just close pipes on error for 2.7 and 3.2. Yeah, that seems right. -- _

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-09-01 Thread STINNER Victor
STINNER Victor added the comment: > The second patch looks good. Tests? Ok, I will try to write a new patch with tests. > But, it *probably* shouldn't be applied to 2.7& 3.2 given that it is a > behaviour change. I consider that this issue is a bug, so it should be fixed in 2.7 and 3.2. I

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-08-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: The second patch looks good. Tests? I think it would be better to kill the process than to let it carry on. But, it *probably* shouldn't be applied to 2.7 & 3.2 given that it is a behaviour change. -- ___ Python t

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-07-11 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-07-05 Thread STINNER Victor
STINNER Victor added the comment: See also issue #12044 which changed the context manager to call the wait() method. -- ___ Python tracker ___ _

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-07-05 Thread STINNER Victor
STINNER Victor added the comment: subprocess_check_output-2.patch is a more complete patch: "fix" (?) call(), check_output() and getstatusoutput(). These functions kill the process if an exception occurs to not hang on wait() in Popen.__exit__(). Because of the kill, I don't know if the fix s

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-07-04 Thread STINNER Victor
New submission from STINNER Victor : subprocess.check_output() doesn't close explicitly pipes if an error occurs. See for example issue #12493 for an example of an error on .communicate(). Attached patch uses a context manager to ensure that all pipes are always closed and that the status is r