@@ -13,7 +13,8 @@ def sigterm_handler_wrap(_signo): | |||
def func(_signo, _stack_frame): | |||
logger.info("signal {} received, exiting...".format(_signo)) | |||
conf().save_user_datas() | |||
return old_handler(_signo, _stack_frame) | |||
if callable(old_handler): # check old_handler | |||
return old_handler(_signo, _stack_frame) | |||
signal.signal(_signo, func) | |||
def run(): | |||