[issue7978] SocketServer doesn't handle syscall interruption
Antoine Pitrou
report at bugs.python.org
Wed Apr 28 22:06:19 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
> In BaseServer, a threading.Event is used in shutdown, so it can block
> until server_forever is finished (after checking __serving). Since the
> SIGTERM interrupts the select system call, the event set is never
> reached, and shutdown hangs waiting on the event.
This precise use case is already fixed (in SVN trunk and in the 2.6
branch) since the select() loop is now wrapped in a try..finally.
I just ran your test case and killing -TERM works ok.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7978>
_______________________________________
More information about the Python-bugs-list
mailing list