diff --git a/mozilla/build/pgo/automation.py.in b/mozilla/build/pgo/automation.py.in index fbab78140c1..09cc15acab6 100644 --- a/mozilla/build/pgo/automation.py.in +++ b/mozilla/build/pgo/automation.py.in @@ -185,9 +185,15 @@ class Process: "Continues execution of this process on a separate thread." p = self._process out = self._out + + if IS_WIN32: + running = lambda: p.poll() is None + else: + running = lambda: p.poll() == -1 + # read in lines until the process finishes, then read in any last remaining # buffered lines - while p.poll() == -1: + while running(): line = out.readline().rstrip() if len(line) > 0: log.info(line)