mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-09 01:27:17 +00:00
12 lines
246 B
Python
12 lines
246 B
Python
from signal import signal, SIGTERM, SIGINT
|
|
|
|
from tfw.event_handlers import EventHandler
|
|
|
|
|
|
def setup_signal_handlers():
|
|
def stop(*_):
|
|
EventHandler.stop_all_instances()
|
|
exit(0)
|
|
signal(SIGTERM, stop)
|
|
signal(SIGINT, stop)
|