This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exarkun
Recipients exarkun, neologix, nvetoshkin, pitrou
Date 2010-04-04.12:31:33
SpamBayes Score 7.055412e-12
Marked as misclassified No
Message-id <1270384295.93.0.372649525527.issue7978@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2010-04-04 12:31:35exarkunsetrecipients: + exarkun, pitrou, nvetoshkin, neologix
2010-04-04 12:31:35exarkunsetmessageid: <1270384295.93.0.372649525527.issue7978@psf.upfronthosting.co.za>
2010-04-04 12:31:34exarkunlinkissue7978 messages
2010-04-04 12:31:33exarkuncreate