summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorRolf <rolf>2021-03-14 18:58:59 -0300
committerRolf <rolf>2021-03-14 19:04:36 -0300
commit80025c32444c1f0836636cb15b771f53a6d4553b (patch)
tree0b6b290f33808849a9075f334885d9f57bf17682 /searx
parent9292571304376c2c463fb26ee0db89298bb00e6c (diff)
downloadsearxng-80025c32444c1f0836636cb15b771f53a6d4553b.tar.gz
searxng-80025c32444c1f0836636cb15b771f53a6d4553b.zip
Windows does not support SIGUSR1, so don't use it unconditionally.
Diffstat (limited to 'searx')
-rw-r--r--searx/search/checker/background.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/searx/search/checker/background.py b/searx/search/checker/background.py
index 22a51b8bb..c3292d9ac 100644
--- a/searx/search/checker/background.py
+++ b/searx/search/checker/background.py
@@ -94,8 +94,10 @@ def _signal_handler(signum, frame):
def initialize():
- logger.info('Send SIGUSR1 signal to pid %i to start the checker', os.getpid())
- signal.signal(signal.SIGUSR1, _signal_handler)
+ if hasattr(signal, 'SIGUSR1'):
+ # 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
_set_result({'status': 'disabled'}, include_timestamp=False)