Script execution

This commit is contained in:
2022-08-30 15:12:26 +02:00
parent 0bb443214f
commit 574777bf5d

View File

@@ -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)