Module: check_mk
Branch: master
Commit: fab632128b3de6b057c0b53b9ed87ad82c1e39b8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fab632128b3de6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 22 09:45:56 2018 +0100
6911 FIX Fixed terminating process on multiple restart requests
When sending multiple restart requests (using SIGUSR1) in a short time to the livestatus
proxy
daemon this could lead to a stopped livestatus proxy process. In this situation the
process
had to be started manually again.
Change-Id: Ib036d8f3db1bc7455a3e6f295338d198179fbf4a
---
.werks/6911 | 12 ++++++++++++
cmk/gui/watolib.py | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6911 b/.werks/6911
new file mode 100644
index 0000000..81c3c89
--- /dev/null
+++ b/.werks/6911
@@ -0,0 +1,12 @@
+Title: Fixed terminating process on multiple restart requests
+Level: 1
+Component: liveproxy
+Compatible: compat
+Edition: cee
+Version: 1.6.0i1
+Date: 1542876290
+Class: fix
+
+When sending multiple restart requests (using SIGUSR1) in a short time to the livestatus
proxy
+daemon this could lead to a stopped livestatus proxy process. In this situation the
process
+had to be started manually again.
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index f1e2aa6..da5ef92 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -63,6 +63,7 @@ import copy
import socket
import time
import threading
+import signal
from hashlib import sha256
from pathlib2 import Path
@@ -4207,7 +4208,7 @@ class ConfigDomainLiveproxy(ConfigDomain):
pidfile = cmk.paths.livestatus_unix_socket + "proxyd.pid"
try:
pid = int(file(pidfile).read().strip())
- os.kill(pid, 10)
+ os.kill(pid, signal.SIGUSR1)
except IOError as e:
if e.errno == 2: # No such file or directory
pass