summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/robust.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-10 13:09:27 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-10 13:09:27 +0000
commit03768c4b2befa8a6cc619a25097a232b36243909 (patch)
treea2088ae522408662c08783bc049adc20a117f2c9 /rdiff-backup/rdiff_backup/robust.py
parentfce09cb7e56fa39daaecce4ee320fffe2960d162 (diff)
downloadrdiff-backup-03768c4b2befa8a6cc619a25097a232b36243909.tar.gz
Add Windows-specific logic for checking if another rdiff-backup process
is running. Do not try to handle non-existant SIGHUP and SIGQUIT signals on Windows. (Patch from Josh Nisly) git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@887 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/robust.py')
-rw-r--r--rdiff-backup/rdiff_backup/robust.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py
index 9dd0d85..df190d4 100644
--- a/rdiff-backup/rdiff_backup/robust.py
+++ b/rdiff-backup/rdiff_backup/robust.py
@@ -104,7 +104,12 @@ def signal_handler(signum, frame):
def install_signal_handlers():
"""Install signal handlers on current connection"""
- for signum in [signal.SIGQUIT, signal.SIGHUP, signal.SIGTERM]:
+ signals = [signal.SIGTERM, signal.SIGINT]
+ try:
+ signals.extend([signal.SIGHUP, signal.SIGQUIT])
+ except AttributeError:
+ pass
+ for signum in signals:
signal.signal(signum, signal_handler)