Commit e0591f94 authored by dgaudet's avatar dgaudet

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@796 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ba4802d1
New in v1.1.10 (????/??/??) 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. Sockets don't have extended attributes -- don't try to access them.
(Patch from Andrew Ferguson.) (Patch from Andrew Ferguson.)
......
...@@ -342,11 +342,11 @@ def check_pids(curmir_incs): ...@@ -342,11 +342,11 @@ def check_pids(curmir_incs):
def pid_running(pid): def pid_running(pid):
"""True if we know if process with pid is currently running""" """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: except OSError, exc:
if exc[0] == errno.ESRCH: return 0 if exc[0] == errno.ESRCH: return 0
elif exc[0] == errno.EINVAL: return 1 else: Log("Warning: unable to check if PID %d still running" % (pid,), 2)
Log("Warning: unable to check if PID %d still running" % (pid,), 2) return 1
for curmir_rp in curmir_incs: for curmir_rp in curmir_incs:
assert Globals.local_connection is curmir_rp.conn assert Globals.local_connection is curmir_rp.conn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment