From: N. Engelhardt Date: Tue, 16 Jun 2020 10:41:26 +0000 (+0200) Subject: ignore race condition in killing already-terminated process X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25502e16ef942ce573bdafcb29251a973753eddc;p=SymbiYosys.git ignore race condition in killing already-terminated process --- diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 972e047..5e34696 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -118,7 +118,10 @@ class SbyTask: if not self.silent: self.job.log("{}: terminating process".format(self.info)) if os.name == "posix": - os.killpg(self.p.pid, signal.SIGTERM) + try: + os.killpg(self.p.pid, signal.SIGTERM) + except PermissionError: + pass self.p.terminate() self.job.tasks_running.remove(self) all_tasks_running.remove(self)