summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-03-06 18:58:37 +0000
committerdgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-03-06 18:58:37 +0000
commit31436edba539f5f20e7752b89e492632f454d958 (patch)
tree8aec683cc1a5082334785eda68ae892f06eeca44
parent81c7094ab3b70b7effb43b11914562d11e0f6a5d (diff)
downloadrdiff-backup-31436edba539f5f20e7752b89e492632f454d958.tar.gz
Use signal 0 rather than signal.NSIG when testing if another rdiff-backup
is still running. (Patch from Sébastien Maret) git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@796 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-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