From 093b3ec0741c50462ffd2cd5afd9d07dbf6e42be Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 28 Jan 2015 10:35:55 +0100 Subject: Fixed (ICE-6190) - Improve WinRT ssl/wss testing --- scripts/Expect.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/Expect.py') diff --git a/scripts/Expect.py b/scripts/Expect.py index 694d1cdfbeb..985e5c80e5b 100755 --- a/scripts/Expect.py +++ b/scripts/Expect.py @@ -329,9 +329,14 @@ def cleanup(): except: pass processes.clear() - atexit.register(cleanup) +def signal_handler(signal, frame): + cleanup() + sys.exit(0) +signal.signal(signal.SIGINT, signal_handler) +signal.signal(signal.SIGTERM, signal_handler) + class Expect (object): def __init__(self, command, startReader = True, timeout=30, logfile=None, mapping = None, desc = None, cwd = None, env = None): self.buf = "" # The part before the match -- cgit v1.2.3