Author vstinner
Recipients Arfrever, akira, dmalcolm, martin.panter, pitrou, python-dev, rosslagerwall, serhiy.storchaka, vstinner
Date 2015-03-03.09:53:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I opened the issue #23570: Change "with subprocess.Popen():" (context manager) to ignore broken pipe error.

> FAIL: test_broken_pipe_cleanup (test.test_subprocess.ContextManagerTests)

Serhiy: see existing test_communicate_epipe() and test_communicate_epipe_only_stdin() tests which are now reliable and portable.

You should write more data (2**20 bytes) and set the buffer size to a value larger than the input data, to buffer all data, so the write occurs at stdin.close() in Popen.__exit__().

By the way, instead of an hardcoded value (2**20), support.PIPE_MAX_SIZE may be more appropriate.
Date User Action Args
2015-03-03 09:53:50vstinnersetrecipients: + vstinner, pitrou, Arfrever, dmalcolm, akira, rosslagerwall, python-dev, martin.panter, serhiy.storchaka
2015-03-03 09:53:50vstinnersetmessageid: <>
2015-03-03 09:53:50vstinnerlinkissue21619 messages
2015-03-03 09:53:50vstinnercreate