summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/regress.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 47cba09..cbada73 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.10 (????/??/??)
---------------------------
+Use signal 0 rather than signal.NSIG when testing if another rdiff-backup
+is still running. (Patch from Sébastien Maret)
+
Sockets don't have extended attributes -- don't try to access them.
(Patch from Andrew Ferguson.)
diff --git a/rdiff-backup/rdiff_backup/regress.py b/rdiff-backup/rdiff_backup/regress.py
index 9f4b925..601aacb 100644
--- a/rdiff-backup/rdiff_backup/regress.py
+++ b/rdiff-backup/rdiff_backup/regress.py
@@ -342,11 +342,11 @@ def check_pids(curmir_incs):
def pid_running(pid):
"""True if we know if process with pid is currently running"""
- try: os.kill(pid, signal.NSIG)
+ try: os.kill(pid, 0)
except OSError, exc:
if exc[0] == errno.ESRCH: return 0
- elif exc[0] == errno.EINVAL: return 1
- Log("Warning: unable to check if PID %d still running" % (pid,), 2)
+ else: Log("Warning: unable to check if PID %d still running" % (pid,), 2)
+ return 1
for curmir_rp in curmir_incs:
assert Globals.local_connection is curmir_rp.conn