X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fdaemon.py;h=06f7beeae9a36e33459f3207a25f6fb75715f8af;hb=0236b2bf31b893ab0b53374c0d3a0bc0ab9deda3;hp=b0b1130172450ac21c0196a4ec05a801f58d4d7e;hpb=02644ed407ef89aa5fadee5344f62216572c7588;p=mpd-sima.git diff --git a/sima/lib/daemon.py b/sima/lib/daemon.py index b0b1130..06f7bee 100644 --- a/sima/lib/daemon.py +++ b/sima/lib/daemon.py @@ -27,7 +27,7 @@ import atexit import os import sys import time -from signal import signal, SIGTERM +from signal import signal, SIGTERM, SIGHUP, SIGUSR1 class Daemon(object): @@ -124,10 +124,16 @@ class Daemon(object): """Declare signal handlers """ signal(SIGTERM, self.exit_handler) + signal(SIGHUP, self.hup_handler) + signal(SIGUSR1, self.hup_handler) def exit_handler(self, signum, frame): sys.exit(1) + def hup_handler(self, signum, frame): + """SIGHUP handler""" + pass + def delpid(self): """Remove PID file""" try: