| Index: blimp/tools/client_engine_integration.py
|
| diff --git a/blimp/tools/client_engine_integration.py b/blimp/tools/client_engine_integration.py
|
| index f1807f38cfde71d61f3b9718402d90c1fc9b1ea4..d7148f4ecc025a0dcd658637c11738284648c6fb 100755
|
| --- a/blimp/tools/client_engine_integration.py
|
| +++ b/blimp/tools/client_engine_integration.py
|
| @@ -19,7 +19,6 @@ import re
|
| import signal
|
| import subprocess
|
| import sys
|
| -import time
|
|
|
| SRC_PATH = os.path.abspath(
|
| os.path.join(os.path.dirname(__file__), '..', '..'))
|
| @@ -102,6 +101,7 @@ def RunEngine(output_linux_directory, token_file_path):
|
| stderr=subprocess.STDOUT)
|
|
|
| for line in iter(p.stdout.readline, ''):
|
| + sys.stdout.write(line)
|
| l = line.rstrip()
|
| match = re.match(PORT_PATTERN, l)
|
| if match:
|
| @@ -200,11 +200,13 @@ def _Run(args, json_file_path, device):
|
| try:
|
| engine_process = _Start(args, json_file_path, device)
|
| while True:
|
| - time.sleep(1)
|
| - return_code = engine_process.poll()
|
| - if return_code is not None:
|
| + nextline = engine_process.stdout.readline()
|
| + if nextline == '' and engine_process.poll() is not None:
|
| # The engine died.
|
| sys.exit(1)
|
| + sys.stdout.write(nextline)
|
| + sys.stdout.flush()
|
| +
|
| except KeyboardInterrupt:
|
| sys.exit(0)
|
| finally:
|
|
|