Martin Panter added the comment:
This works for me on Linux:
>>> signal.pthread_sigmask(signal.SIG_BLOCK, {signal.SIGUSR1})
set()
>>> import threading
>>> t = threading.Thread(target=sigwait)
>>> t.start()
Send me a signal, my PID is 24197
>>> os.kill(os.getpid(), signal.SIGUSR1)
Got the
New submission from Petr MOTEJLEK:
Hi,
The documentation for signal.signal() clearly states that it is only supposed
to be called on MainThread
However, it does not say so for the signal.sigwait() and neither
signal.sigtimedwait()
I think this is an error on the documentation side of things