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 pitrou
Recipients gregory.p.smith, pitrou
Date 2017-12-29.09:45:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514540729.23.0.213398074469.issue32443@psf.upfronthosting.co.za>
In-reply-to
Content
Also see how the forkserver module does without it:
https://github.com/python/cpython/blob/master/Lib/multiprocessing/forkserver.py#L146

Reading Jean-Paul's messages in https://bugs.python.org/issue8407, I'm unclear what is required to take advantage of signalfd().  Jean-Paul says """In order to effectively use signalfd(), the signals in question must be blocked, though""".  The signalfd man page says:

"""Normally, the set of signals to  be  received  via the  file descriptor should be blocked using sigprocmask(2), to prevent the signals being handled according to their default dispositions""".

And it's not clear what is meant by that (what happens if you don't block those signals?). Also:

"""As a consequence of the read(2), the signals are consumed, so that they are no longer pending for the process (i.e., will not be caught by signal handlers, and cannot be accepted using sigwaitinfo(2))."""

But how about the converse?  i.e. can a signal be consumed first by a signal handler and the fd not written to at all?

Also see fork() semantics which might (or not) require special handling.

Also see https://bugs.python.org/issue31489 for an issue related to fork(), signals and fds.
History
Date User Action Args
2017-12-29 09:45:29pitrousetrecipients: + pitrou, gregory.p.smith
2017-12-29 09:45:29pitrousetmessageid: <1514540729.23.0.213398074469.issue32443@psf.upfronthosting.co.za>
2017-12-29 09:45:29pitroulinkissue32443 messages
2017-12-29 09:45:28pitroucreate