Jean-Paul Calderone <exar...@divmod.com> added the comment:

> What kind of signals can be received in real-life?

There are lots of possible answers.  Here's one.  You launch a child process 
with os.fork() (and perhaps os.exec*() as well).  Eventually you'll get a 
SIGCHLD in the parent when the child exits.  If you've also installed a 
Python-level SIGCHLD handler with signal.signal (and not flagged the handler 
with SA_RESTART using signal.siginterrupt) then if you're in select.select() 
when the SIGCHLD is received, select.select() will fail with select.error EINTR.

If your Python SIGCHLD handler deals with the SIGCHLD completely before 
returning, then this lets you support child processes and use SocketServer at 
the same time.

Changing the behavior of select.select() ("a fix at select level would be 
better") should be *very* carefully considered, and probably rejected after 
such consideration.  There are completely legitimate use cases which require 
select.select() to fail with EINTR, and these should remain supported (not to 
mention that existing code relying on this behavior shouldn't be broken by a 
Python upgrade in a quite insidious way).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7978>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to