[issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread

2014-07-01 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: I think that the problem here is that the documentation sets an expectation that's not met, at least from my POV. Running the reproducer, I was expecting the main thread to unpause and execute the signal handler (citing: "Python signal handlers are a

[issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread

2014-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread

2014-07-01 Thread STINNER Victor
STINNER Victor added the comment: First of all, signals and threads usually don't play together. Most signal functions are *not* thread safe. The behaviour of signal functions are not well defined for threads. Example with pause: "pause() causes the calling process (or thread) to sleep

[issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread

2014-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread

2014-07-01 Thread Bohuslav "Slavek" Kabrda
New submission from Bohuslav "Slavek" Kabrda: Reproducer attached. To describe the problem in words, one needs to do this to reproduce this issue: - Create a signal handler and register it using signal.signal to SIGCHLD. - Create a thread that invokes a subprocess, e.g. "sleep 1" and then contin