[issue9867] Interrupted system calls are not retried
Armin Ronacher
report at bugs.python.org
Thu Sep 16 14:06:01 CEST 2010
Armin Ronacher <armin.ronacher at active-4.com> added the comment:
> Hmm. So under what conditions should it continue, and under what
> conditions should it raise an exception (when errno is EINTR)?
EINTR indicates a temporary failure. In that case it should always retry.
A common macro for handling that might look like this:
#define RETRY_ON_EINTR(x) ({ \
typeof(x) rv; \
do { rv = x; } while (rv < 0 && errno == EINTR); \
rv;\
})
But from what I understand, braces in parentheses are a GCC extension.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9867>
_______________________________________
More information about the Python-bugs-list
mailing list