Script execution
This commit is contained in:
@@ -20,14 +20,15 @@ import signal
|
||||
|
||||
|
||||
|
||||
#def on_abort(parent_thread):
|
||||
# print ("abort")
|
||||
# ctype_async_raise(parent_thread, KeyboardInterrupt)
|
||||
# #signal.raise_signal(signal.SIGIOT)
|
||||
def on_abort(parent_thread):
|
||||
print ("on_abort")
|
||||
tid=parent_thread.ident
|
||||
exception = KeyboardInterrupt
|
||||
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(exception))
|
||||
|
||||
|
||||
def on_close(parent_thread):
|
||||
log ("in on_close")
|
||||
print ("on_close")
|
||||
on_abort(parent_thread)
|
||||
|
||||
#def handler(signum, frame):
|
||||
@@ -39,7 +40,12 @@ def on_close(parent_thread):
|
||||
|
||||
|
||||
time.sleep(2.0)
|
||||
print (1)
|
||||
time.sleep(2.0)
|
||||
print (2)
|
||||
time.sleep(2.0)
|
||||
print (3)
|
||||
time.sleep(2.0)
|
||||
time.sleep(2.0)
|
||||
print (4)
|
||||
time.sleep(2.0)
|
||||
print (5)
|
||||
Reference in New Issue
Block a user