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, loewis, marcin.bachry, pitrou, spiv
Date 2010-04-16.13:52:29
SpamBayes Score 1.0305662e-10
Marked as misclassified No
Message-id <>
> The one big difference I can see is that set_wakeup_fd() doesn't transmit the signal number, but this could be fixed if desired (instead of sending '\0', send a byte containing the signal number).

There's a lot more information than the signal number available as well.  The signalfd_siginfo struct has 16 fields in it now and may have more in the future.

Another advantage is that this approach allows all asynchronous preemption to be disabled.  This side-steps the possibility of hitting any signal bugs in CPython itself.  Of course, any such bugs that are found should be fixed, but fixing them is often quite challenging and involves lots of complex domain-specific knowledge.  In comparison, the signalfd and sigprocmask extensions are quite straight-forward and self-contained.

It's also possible to have several signalfds, each with a different signal mask.  set_wakeup_fd is limited to a single fd per-process.

sigprocmask has other uses all by itself, of course, like delaying the delivery of signals while some sensitive code runs.
Date User Action Args
2010-04-16 13:52:33exarkunsetrecipients: + exarkun, loewis, spiv, pitrou, marcin.bachry
2010-04-16 13:52:32exarkunsetmessageid: <>
2010-04-16 13:52:31exarkunlinkissue8407 messages
2010-04-16 13:52:29exarkuncreate