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 <rep...@bugs.python.org> <http://bugs.python.org/issue21772> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com