daemon: Catch additional signals that terminate the process by default.

This commit is contained in:
Tom Goff 2015-12-29 13:50:05 -05:00
parent 47a5e75d1c
commit b84c565329

View file

@ -1630,7 +1630,12 @@ def sighandler(signum, stackframe):
print >> sys.stderr, "terminated by signal:", signum
sys.exit(signum)
signal.signal(signal.SIGHUP, sighandler)
signal.signal(signal.SIGINT, sighandler)
signal.signal(signal.SIGPIPE, sighandler)
signal.signal(signal.SIGTERM, sighandler)
signal.signal(signal.SIGUSR1, sighandler)
signal.signal(signal.SIGUSR2, sighandler)
def getMergedConfig(filename):
''' Return a configuration after merging config file and command-line