From 4def45c15adfc13c1edd4ec3ff94a31275e4c974 Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Mon, 29 Aug 2022 18:36:09 +0200 Subject: [PATCH] Script execution --- script/test/test_abort.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/script/test/test_abort.py b/script/test/test_abort.py index 1f70eff..9bf12fa 100644 --- a/script/test/test_abort.py +++ b/script/test/test_abort.py @@ -1,4 +1,4 @@ - +""" import ctypes def ctype_async_raise(thread, exception): tid=thread.ident @@ -16,21 +16,24 @@ def ctype_async_raise(thread, exception): raise SystemError("PyThreadState_SetAsyncExc failed") 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 ("abort") +# ctype_async_raise(parent_thread, KeyboardInterrupt) +# #signal.raise_signal(signal.SIGIOT) -def handler(signum, frame): - print('Signal handler called with signal', signum) +#def handler(signum, frame): +# print('Signal handler called with signal', signum) # # # # Set the signal handler and a 5-second alarm -signal.signal(signal.SIGINT, handler) +#signal.signal(signal.SIGINT, handler) time.sleep(2.0)