From 393db77f2444f0dcf547cd20bf4099f62d814285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Mon, 27 Jan 2020 16:04:01 -0800 Subject: [PATCH] Ignore SIGINT on Windows. When running this script in Windows jenkins jobs it's receiving a SIGINT rather than SIGTERM. --- scripts/subprocess_reaper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/subprocess_reaper.py b/scripts/subprocess_reaper.py index befb05e2d..59d6d05d1 100755 --- a/scripts/subprocess_reaper.py +++ b/scripts/subprocess_reaper.py @@ -170,4 +170,9 @@ def wait_for_processes(processes, timeout=1.0): # ignore SIGTERM so that if the parent process is killed # and forwards the signal, this script does not die signal.signal(signal.SIGTERM, signal.SIG_IGN) + # When running on Windows the script is receiving a SIGINT + # resulting in a KeyboardInterrupt. Sadly this means that + # the script is not ^C-able on Windows. + if sys.platform == 'win32': + signal.signal(signal.SIGINT, signal.SIG_IGN) sys.exit(main())