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.

Author vstinner
Recipients vstinner
Date 2011-07-04.22:13:44
SpamBayes Score 3.772571e-11
Marked as misclassified No
Message-id <1309817625.67.0.269796238759.issue12494@psf.upfronthosting.co.za>
In-reply-to
Content
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 read to avoid zombies.

Other subprocess functions should be fixed:
 - call() (will fix check_call)
 - getstatusoutput() (will fix getoutput): see patch attached to the issue #10197 to replace os.popen() by subprocess.Popen
History
Date User Action Args
2011-07-04 22:13:45vstinnersetrecipients: + vstinner
2011-07-04 22:13:45vstinnersetmessageid: <1309817625.67.0.269796238759.issue12494@psf.upfronthosting.co.za>
2011-07-04 22:13:45vstinnerlinkissue12494 messages
2011-07-04 22:13:45vstinnercreate