提交 8a99cdb4 编写于 作者: G gzyang

deadlock bugfix caused by stderr buffer blocking

上级 5d8995c5
...@@ -42,4 +42,4 @@ CONFIG_STRUCT = { ...@@ -42,4 +42,4 @@ CONFIG_STRUCT = {
"device_path": None, "device_path": None,
"patch_cache": None "patch_cache": None
} }
VERSION = '0.4.0' VERSION = '0.4.1'
...@@ -94,7 +94,7 @@ def exec_command(cmd, log_path='out/build.log', **kwargs): ...@@ -94,7 +94,7 @@ def exec_command(cmd, log_path='out/build.log', **kwargs):
with open(log_path, 'at', encoding='utf-8') as log_file: with open(log_path, 'at', encoding='utf-8') as log_file:
process = subprocess.Popen(cmd, process = subprocess.Popen(cmd,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.STDOUT,
encoding='utf-8', encoding='utf-8',
**kwargs) **kwargs)
for line in iter(process.stdout.readline, ''): for line in iter(process.stdout.readline, ''):
...@@ -110,14 +110,6 @@ def exec_command(cmd, log_path='out/build.log', **kwargs): ...@@ -110,14 +110,6 @@ def exec_command(cmd, log_path='out/build.log', **kwargs):
ret_code = process.returncode ret_code = process.returncode
if ret_code != 0: if ret_code != 0:
with open(log_path, 'at', encoding='utf-8') as log_file:
for line in iter(process.stderr.readline, ''):
if 'ninja: warning' in line:
log_file.write(line)
continue
hb_error(line)
log_file.write(line)
if is_log_filter: if is_log_filter:
get_failed_log(log_path) get_failed_log(log_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册