Correctly exit with proper unlock on SIGHUP, fixes #1593
Correctly exit with proper unlock on SIGHUP, fixes #1593

If the connections hangs up, the borg server needs to clean
up, especially unlock the repository, so a later try will
work again.

This is especially problematic with systemd systems that have
KillUserProcesses enabled (which is the default): Logind sends
a SIGHUP message to the session scope when the session ends.

RonnyPfannschmidt/borg,raxenak/borg,edgewood/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgimar/borg,RonnyPfannschmidt/borg,raxenak/borg,edgimar/borg,RonnyPfannschmidt/borg,raxenak/borg,edgewood/borg,raxenak/borg,edgimar/borg,edgewood/borg,edgimar/borg,edgewood/borg