From: Miodrag Milanovic Date: Sun, 17 Nov 2019 15:58:35 +0000 (+0100) Subject: Fix sby execution on Windows X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=196c3c779a89457816acdfc7f914ce08fdf62a13;p=SymbiYosys.git Fix sby execution on Windows --- diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 98f4032..b01dc1e 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -34,8 +34,8 @@ def force_shutdown(signum, frame): if os.name == "posix": signal.signal(signal.SIGHUP, force_shutdown) -signal.signal(signal.SIGINT, force_shutdown) -signal.signal(signal.SIGTERM, force_shutdown) + signal.signal(signal.SIGINT, force_shutdown) + signal.signal(signal.SIGTERM, force_shutdown) def process_filename(filename): if filename.startswith("~/"): @@ -242,10 +242,11 @@ class SbyJob: if task.running: fds.append(task.p.stdout) - try: - select(fds, [], [], 1.0) == ([], [], []) - except InterruptedError: - pass + if os.name == "posix": + try: + select(fds, [], [], 1.0) == ([], [], []) + except InterruptedError: + pass for task in self.tasks_running: task.poll()