[Python-Dev] Issue #7978, unexpected EINTR-related exceptions

Yaniv Aknin yaniv at aknin.name
Thu Apr 8 08:11:09 CEST 2010


Issue #7978 (http://bugs.python.org/issue7978) describes a bug in
SocketServer where a received signal in SocketServer's select() call
will raise an uncaught exception due to EINTR. The proposed solution
was to wrap SocketServer's select() with something like twisted's
untilConcludes function, which catches EINTR exceptions and re-calls
the call (see issue for code).

However, before committing this to SocketServer, neologix raised the
(valid) concern that this is generally-useful code, already duplicated
at least in subprocess (_eintr_retry_call, subprocess.py), which can
probably be moved to another module and be shared from there. It was
recommended to bring this issue in the broader context to the list,
but from my look at the archives no one did, hence this message.

There are a few more points of discussion on the issue's roundup
thread which I won't list here, so it's best to look there if you
care. Also, I'm rather new on python-dev and I'm not sure how
duplicate python-dev/roundup threads are usually handled, but I humbly
think if this issue interests you it's best to add your thoughts to
the issue's comments, rather than here; please correct me if this is a
misguided assumption.

Cheers,
 - Yaniv


More information about the Python-Dev mailing list