catch SIGTERM so that on_exit func is executed at this time too.
This commit is contained in:
parent
eaa447c1e1
commit
b716b9aa5b
|
@ -413,6 +413,7 @@ if __name__ == '__main__':
|
||||||
sys.exit(5)
|
sys.exit(5)
|
||||||
# ^C exits the application normally to delete pid file
|
# ^C exits the application normally to delete pid file
|
||||||
signal.signal(signal.SIGINT, sigint_cb)
|
signal.signal(signal.SIGINT, sigint_cb)
|
||||||
|
signal.signal(signal.SIGTERM, sigint_cb)
|
||||||
|
|
||||||
log.info("Encodings: d:%s, fs:%s, p:%s", sys.getdefaultencoding(), \
|
log.info("Encodings: d:%s, fs:%s, p:%s", sys.getdefaultencoding(), \
|
||||||
sys.getfilesystemencoding(), locale.getpreferredencoding())
|
sys.getfilesystemencoding(), locale.getpreferredencoding())
|
||||||
|
|
Loading…
Reference in New Issue