diff --git a/aikido_zen/background_process/aikido_background_process.py b/aikido_zen/background_process/aikido_background_process.py index 881e03b9b..da00af662 100644 --- a/aikido_zen/background_process/aikido_background_process.py +++ b/aikido_zen/background_process/aikido_background_process.py @@ -8,6 +8,7 @@ import sched import traceback import sys +import platform from threading import Thread from queue import Queue from aikido_zen.helpers.logging import logger @@ -118,7 +119,11 @@ def add_exit_handlers(): def exit_gracefully(sig, frame): sys.exit(0) + current_platform = platform.system() + signal.signal(signal.SIGINT, exit_gracefully) signal.signal(signal.SIGTERM, exit_gracefully) - signal.signal(signal.SIGQUIT, exit_gracefully) - signal.signal(signal.SIGHUP, exit_gracefully) + + if current_platform in ("Linux", "Darwin"): + signal.signal(signal.SIGQUIT, exit_gracefully) + signal.signal(signal.SIGHUP, exit_gracefully)