Message237116
| 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 |
<1425376430.84.0.904661412858.issue21619@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|