diff --git a/oapen-engine/src/tasks/daemon.py b/oapen-engine/src/tasks/daemon.py index 1d4fd69..b7cb6d0 100644 --- a/oapen-engine/src/tasks/daemon.py +++ b/oapen-engine/src/tasks/daemon.py @@ -1,10 +1,13 @@ # Daemon to run processes in the background import time import sys, signal + + def signal_handler(signal, frame): print("\nprogram exiting gracefully") sys.exit(0) + signal.signal(signal.SIGINT, signal_handler)