I fixed a bug in asyncore.poll() in Python 2.3; quoting the Python cvs
log: Fix an old bug in poll(). When a signal is handled while we're blocked in select(), this will raise select.error with errno set to EINTR. The except clauses correctly ignores this error, but the rest of the logic will then call read() for all objects in select's *input* list of read file descriptors. Then when an object's read_handler() is naive, it will call recv() on its socket, which will raise an IOError, and then asyncore decides to close the socket. To fix this, we simply return in this case. Rather than incorporating a fixed copy of asyncore.py in Zope2 and ZODB3, I'm incorporating a fixed copy of just asyncore.poll() in this file, since we already have a copy of asyncore.loop() here.
Showing
Please register or sign in to comment