3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-05 22:14:08 +00:00

Fix sby execution on Windows

This commit is contained in:
Miodrag Milanovic 2019-11-17 16:58:35 +01:00
parent 23f89011b6
commit 196c3c779a

View file

@ -34,8 +34,8 @@ def force_shutdown(signum, frame):
if os.name == "posix": if os.name == "posix":
signal.signal(signal.SIGHUP, force_shutdown) signal.signal(signal.SIGHUP, force_shutdown)
signal.signal(signal.SIGINT, force_shutdown) signal.signal(signal.SIGINT, force_shutdown)
signal.signal(signal.SIGTERM, force_shutdown) signal.signal(signal.SIGTERM, force_shutdown)
def process_filename(filename): def process_filename(filename):
if filename.startswith("~/"): if filename.startswith("~/"):
@ -242,10 +242,11 @@ class SbyJob:
if task.running: if task.running:
fds.append(task.p.stdout) fds.append(task.p.stdout)
try: if os.name == "posix":
select(fds, [], [], 1.0) == ([], [], []) try:
except InterruptedError: select(fds, [], [], 1.0) == ([], [], [])
pass except InterruptedError:
pass
for task in self.tasks_running: for task in self.tasks_running:
task.poll() task.poll()