homepage

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 martin.panter, serhiy.storchaka, vstinner
Date 2015年03月03日.09:49:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425376156.84.0.317071254674.issue23570@psf.upfronthosting.co.za>
In-reply-to
Content
The Popen.communicate() method ignores broken pipe error when writing to stdin. I propose to modify Popen.__exit__() to do the same in Python 3.5.
Attached patch implements this suggestion and document it. I added this paragraph to Popen doc:
"The context manager ignores broken pipe errors when closing the process’s stdin: call explicitly proc.stdin.flush() and proc.stdin.close() to get broken pipe errors."
So it's still possible to get broken pipe errors if you need them.
Do you know applications or libraries which rely on broken pipe errors and do something different than just ignoring them?
I prefer to leave Python 3.4 unchanged to avoid subtle behaviour changes in minor Python releases.
See also:
- issue #21619 which modified Popen.__exit__() to call wait() even if stdin.close() raised an exception
- issue #19612 which modified communicate() to handle EINVAL on stdin.write() on Windows
History
Date User Action Args
2015年03月03日 09:49:16vstinnersetrecipients: + vstinner, martin.panter, serhiy.storchaka
2015年03月03日 09:49:16vstinnersetmessageid: <1425376156.84.0.317071254674.issue23570@psf.upfronthosting.co.za>
2015年03月03日 09:49:16vstinnerlinkissue23570 messages
2015年03月03日 09:49:16vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /