X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3f5b70e78c4008e0de876e53fc7fbbc0671a6937..d10c79192b333191796d949841ec792e61a6006c:/crunch_scripts/run-command diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command index 266a12d237..74793d4fce 100755 --- a/crunch_scripts/run-command +++ b/crunch_scripts/run-command @@ -399,16 +399,17 @@ try: while len(pids) > 0: try: (pid, status) = os.wait() - pids.discard(pid) - if not taskp.get("task.ignore_rcode"): - rcode[pid] = (status >> 8) - else: - rcode[pid] = 0 except OSError as e: if e.errno == errno.EINTR: pass else: raise + else: + pids.discard(pid) + if not taskp.get("task.ignore_rcode"): + rcode[pid] = (status >> 8) + else: + rcode[pid] = 0 if sig.sig is not None: logger.critical("terminating on signal %s" % sig.sig)