From: Mark Wooding Date: Sun, 28 May 2017 18:03:08 +0000 (+0100) Subject: rhodes: Don't try to kill ourselves when zapping redundant workers. X-Git-Url: https://git.distorted.org.uk/~mdw/rhodes/commitdiff_plain/75c2c06a8c9545871fefbe3e57ff283023c37e07 rhodes: Don't try to kill ourselves when zapping redundant workers. For some reason the old code didn't actually break, but it seems like a bad idea to try. --- diff --git a/rhodes b/rhodes index 90876f1..b9d97fa 100755 --- 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 = ?""",