Windows does not support SIGUSR1, so don't use it unconditionally.

This commit is contained in:
Rolf 2021-03-14 18:58:59 -03:00
parent 9292571304
commit 80025c3244
1 changed files with 4 additions and 2 deletions

View File

@ -94,8 +94,10 @@ def _signal_handler(signum, frame):
def initialize(): def initialize():
logger.info('Send SIGUSR1 signal to pid %i to start the checker', os.getpid()) if hasattr(signal, 'SIGUSR1'):
signal.signal(signal.SIGUSR1, _signal_handler) # Windows doesn't support SIGUSR1
logger.info('Send SIGUSR1 signal to pid %i to start the checker', os.getpid())
signal.signal(signal.SIGUSR1, _signal_handler)
# disabled by default # disabled by default
_set_result({'status': 'disabled'}, include_timestamp=False) _set_result({'status': 'disabled'}, include_timestamp=False)