[issue32443] Add Linux's signalfd() to the signal module

2018-01-05 Thread Nathaniel Smith
Change by Nathaniel Smith : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list

[issue32443] Add Linux's signalfd() to the signal module

2017-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Regardless, it'd be nice to have it available in the stdlib so it could be > used if deemed useful. Agreed. > Signals are process global state, no thread compatible library can rightfully > take ownership of a one. But then is the

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: My reading of the Linux signalfd man page may be optimistic. :) Regardless, it'd be nice to have it available in the stdlib so it could be used if deemed useful. I expect this to only ever be added by someone making use of it in another

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: 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

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: See also https://bugs.python.org/issue12304 -- nosy: +pitrou ___ Python tracker ___

[issue32443] Add Linux's signalfd() to the signal module

2017-12-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: An example subprocess improvement using sigtimedwait() - https://github.com/python/cpython/pull/5035 - led me to believe that signalfd() is superior as it sounds like signalfd() does not require pthread_sigmask (sigprocmask) global state

[issue32443] Add Linux's signalfd() to the signal module

2017-12-28 Thread Gregory P. Smith
New submission from Gregory P. Smith : We should add a wrapper for both signalfd() and a function to read and decode the structure from the fd into a dataclass. The code we need to build such a thing from appears to exist in BSD & MIT licensed form in: PyPI contains two