[issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread

Nathaniel Smith report at bugs.python.org
Tue Mar 21 20:55:05 EDT 2017


Nathaniel Smith added the comment:

I don't really have a specific use case personally -- for trio, I haven't found a way to make use of set_wakeup_fd because of various issues[1], but I'm also not planning to use SIGCHLD, so this isn't very urgent.

In general set_wakeup_fd can be a workaround, but I wanted to note this upstream because it's a bug in Python's signal handler logic. Note that Python already goes to great lengths to make e.g. signal handlers run during time.sleep on Windows; they ought to just work on Unix too.

--

[1] (Off-topic but in case you're curious: I register actual signal handlers anyway because I follow the philosophy that the wakeup pipe should only be used for wakeups rather than transmitting information, so as long as signal handlers work I can do my own wakeups, + for some reason set_wakeup_fd doesn't work for me on Windows (no idea why, can't reproduce in simplified tests, might be my fault, need to debug), + set_wakeup_fd's handling of buffer overflow is broken for my purposes.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21895>
_______________________________________


More information about the Python-bugs-list mailing list