Message102337
> 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). |
|
Date |
User |
Action |
Args |
2010-04-04 12:31:35 | exarkun | set | recipients:
+ exarkun, pitrou, nvetoshkin, neologix |
2010-04-04 12:31:35 | exarkun | set | messageid: <1270384295.93.0.372649525527.issue7978@psf.upfronthosting.co.za> |
2010-04-04 12:31:34 | exarkun | link | issue7978 messages |
2010-04-04 12:31:33 | exarkun | create | |
|