Module: check_mk
Branch: master
Commit: 398de527a88015ced0d1a85ac0f739eb37f006e4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=398de527a88015…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 13 08:26:05 2016 +0200
mkeventd: Minor cleanups
---
bin/mkeventd | 33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/bin/mkeventd b/bin/mkeventd
index a2b67dc..a9662c4 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -1,5 +1,28 @@
#!/usr/bin/env python
-# encoding: utf-8
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
import socket, os, time, sys, getopt, signal, thread, pprint, re, \
select, subprocess, stat, string
@@ -4178,10 +4201,10 @@ try:
file(g_pid_file, "w").write("%d\n" % os.getpid())
# Install signal hander
- signal.signal(1, signal_handler) # HUP (--> reload)
- signal.signal(2, signal_handler) # INT
- signal.signal(3, signal_handler) # QUIT
- signal.signal(15, signal_handler) # TERM
+ signal.signal(signal.SIGHUP, signal_handler)
+ signal.signal(signal.SIGINT, signal_handler)
+ signal.signal(signal.SIGQUIT, signal_handler)
+ signal.signal(signal.SIGTERM, signal_handler)
# Now let's go...
run_eventd()