STINNER Victor added the comment:

2013/12/3 Guido van Rossum <rep...@bugs.python.org>:
> Please answer this question. Under what circumstances can a signal handler 
> interrupt a blocking system call in a thread that is not the main thread?

There is no guarantee that the signal handler is called in the main
thread. On FreeBSD, if I remember correctly, it is called in a random
thread.

You can control which thread gets the signal using
signal.pthread_sigmask() (block signals in other threads) and
signal.pthread_kill() (send a signal a specific thread).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to