I'm running two python threads (import threading
). Both of them are blocked on a open()
call; in fact they try to open named pipes in order to write in them, so it's a normal behaviour to block until somebody try to read from the named pipe.
In short, it looks like:
import threading
def f():
open('pipe2', 'r')
if __name__ == '__main__':
t = threading.Thread(target=f)
t.start()
open('pipe1', 'r')
When I type a ^C, the open()
in the main thread is interrupted (raises IOError
with errno == 4).
My problem is: the t
threads still waits, and I'd like to propagate the interruption behaviour, in order to make it raise IOError
too.