[Python-Dev] Issue #7978, unexpected EINTR-related exceptions (original) (raw)

Victor Stinner victor.stinner at haypocalc.com
Thu Apr 8 11:11:16 CEST 2010


Le jeudi 08 avril 2010 08:11:09, Yaniv Aknin a écrit :

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 (eintrretrycall, subprocess.py), which can probably be moved to another module and be shared from there. (...)

+1 to share EINTR-related code, but I don't know the best place for such functions. Maybe the os module?

-- Victor Stinner http://www.haypocalc.com/



More information about the Python-Dev mailing list