chiark / gitweb /
rhodes: Don't try to kill ourselves when zapping redundant workers.
[rhodes] / rhodes
diff --git a/rhodes b/rhodes
index 90876f1..b9d97fa 100755 (executable)
--- a/rhodes
+++ b/rhodes
@@ -466,7 +466,8 @@ def step(dir, cmd, *args):
       ## we lose a bunch of work. :-(
       c.execute("""SELECT pid FROM workers WHERE p = ? AND k = ?""",
                 (str(p), k))
-      for pid, in c: maybe_kill_worker(dir, pid)
+      for pid, in c:
+        if pid != mypid: maybe_kill_worker(dir, pid)
       c.execute("""DELETE FROM workers WHERE p = ? AND k = ?""",
                 (str(p), k - 1))
       c.execute("""DELETE FROM points WHERE p = ? AND k = ?""",