chiark / gitweb /
rhodes: Open lock files with the right permissions for exclusive locking.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 28 May 2017 18:03:08 +0000 (19:03 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 19 Jun 2017 09:29:20 +0000 (10:29 +0100)
rhodes

diff --git a/rhodes b/rhodes
index 8152999..90876f1 100755 (executable)
--- a/rhodes
+++ b/rhodes
@@ -286,7 +286,7 @@ def maybe_cleanup_worker(dir, db, pid):
 
 def maybe_kill_worker(dir, pid):
   f = OS.path.join(dir, 'lk.%d' % pid)
-  try: fd = OS.open(f, OS.O_RDONLY)
+  try: fd = OS.open(f, OS.O_RDWR)
   except OSError, err:
     if err.errno != E.ENOENT: raise ExpectedError, 'open lockfile: %s' % err
     return