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 neologix
Recipients David.Edelsohn, gvanrossum, larry, neologix, pitrou, python-dev, skrah
Date 2013-10-19.23:34:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> Guido van Rossum added the comment:
> Actually, I think we're talking about the actual select() syscal not
> returning when SIGCHLD is received and handled. Running the C-level handler
> isn't enough, the syscall must return with EINTR so the Python handler can
> run (which then writes a byte to the self-pipe to ensure select() returns,
> but that seems too late).

I just realized the following: there's no need for EINTR to break out
of select(), that's what the self-pipe is for: since the write-end is
registered as wakeup FD, and the read-end is registered in the
selector, when the C-level signal handler is executed, it writes to
the wakeup FD, therefore the select() syscall should return with the
read-end ready, or more likely fail with EINTR. And then, the
Python-level signal handler should be executed (from the main loop),
scheduling a callback, and re-trigerring a wakup through the

If this doesn't work as-is, I only see two explanations:
- the C-level signal handler doesn't get called, which seems impossible
- the python-level signal handler doesn't get executed before the main
loop re-enters select(), but since the new GIL signal handlers are
called at each eval loop

In short, I'm puzzled. I can tell why my patch should work, but I'm
not sure why the current approach doesn't.
Date User Action Args
2013-10-19 23:34:07neologixsetrecipients: + neologix, gvanrossum, pitrou, larry, skrah, python-dev, David.Edelsohn
2013-10-19 23:34:07neologixlinkissue19293 messages
2013-10-19 23:34:07neologixcreate