diff options
author | dgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2007-03-06 18:58:37 +0000 |
---|---|---|
committer | dgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2007-03-06 18:58:37 +0000 |
commit | 31436edba539f5f20e7752b89e492632f454d958 (patch) | |
tree | 8aec683cc1a5082334785eda68ae892f06eeca44 /rdiff-backup/rdiff_backup/regress.py | |
parent | 81c7094ab3b70b7effb43b11914562d11e0f6a5d (diff) | |
download | rdiff-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
Diffstat (limited to 'rdiff-backup/rdiff_backup/regress.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/regress.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |