Pass through several more Unix signals that Borg happens to consume.

This commit is contained in:
Dan
2017-10-31 22:10:00 -07:00
parent f017ed648f
commit fd77dc579e
2 changed files with 4 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ def _handle_signal(signal_number, frame): # pragma: no cover
def configure_signals(): # pragma: no cover
'''
Configure borgmatic's signal handlers to pass relevant signals through to any child processes
like Borg.
like Borg. No that SIGINT gets passed through already even without these changes.
'''
signal.signal(signal.SIGTERM, _handle_signal)
for signal_number in (signal.SIGHUP, signal.SIGTERM, signal.SIGUSR1, signal.SIGUSR2):
signal.signal(signal_number, _handle_signal)