##// END OF EJS Templates
Merge pull request #7688 from minrk/callable-interrupt...
Thomas Kluyver -
r20349:a8827f0e merge
parent child Browse files
Show More
@@ -1,10 +1,13
1 # Standard library imports.
1 # Copyright (c) IPython Development Team.
2 # Distributed under the terms of the Modified BSD License.
3
2 4 try:
3 5 import ctypes
4 6 except:
5 7 ctypes = None
6 8 import os
7 9 import platform
10 import signal
8 11 import time
9 12 try:
10 13 from _thread import interrupt_main # Py 3
@@ -129,6 +132,9 class ParentPollerWindows(Thread):
129 132 handle = handles[result - WAIT_OBJECT_0]
130 133
131 134 if handle == self.interrupt_handle:
135 # check if signal handler is callable
136 # to avoid 'int not callable' error (Python issue #23395)
137 if callable(signal.getsignal(signal.SIGINT)):
132 138 interrupt_main()
133 139
134 140 elif handle == self.parent_handle:
General Comments 0
You need to be logged in to leave comments. Login now