daemon: Catch additional signals that terminate the process by default.
This commit is contained in:
parent
47a5e75d1c
commit
b84c565329
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue