on master help sign in
Windows does not support SIGUSR1, so don't use it unconditionally.
80025c3Rolf
searx/search/checker/background.py+4−2
@@ -94,8 +94,10 @@ def _signal_handler(signum, frame):
94
94
95
95
96def initialize():
96def initialize():
97+ if hasattr(signal, 'SIGUSR1'):
98+ # Windows doesn't support SIGUSR1
97− logger.info('Send SIGUSR1 signal to pid %i to start the checker', os.getpid())
99+ logger.info('Send SIGUSR1 signal to pid %i to start the checker', os.getpid())
98− signal.signal(signal.SIGUSR1, _signal_handler)
100+ signal.signal(signal.SIGUSR1, _signal_handler)
99
101
100 # disabled by default
102 # disabled by default
101 _set_result({'status': 'disabled'}, include_timestamp=False)
103 _set_result({'status': 'disabled'}, include_timestamp=False)