[issue21772] platform.uname() not EINTR safe
Charles-François Natali
report at bugs.python.org
Wed Jun 18 09:03:01 CEST 2014
Charles-François Natali added the comment:
> I'm surprised that the Python read() method doesn't handle EINTR internally.
>
> I'm in favor of handling EINTR internally almost everywhere, I mean in the Python modules implemented in the C, not in each call using these C methods. "handling EINTR" means calling PyErr_CheckSignals() which may raises a Python exception (ex: KeyboardInterrupt).
It's good, we all agree on that.
I think the different EINTR-related reports should be closed as #18885
duplicates.
Then we need a patch for #18885: my idea was to write a pair of macros
similar to Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS that would
handle the retry logic, instead of having to check for EINTR and
calling Py_CheckPendingSignals() everywhere.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21772>
_______________________________________
More information about the Python-bugs-list
mailing list