add a safety net timeout for feature checks

This commit is contained in:
Jakob Ketterl 2023-09-01 22:49:58 +02:00
parent 8d2671fadb
commit 687bf1c3d2

View file

@ -165,7 +165,14 @@ class FeatureDetector(object):
cwd=tmp_dir,
env=env,
)
rc = process.wait()
while True:
try:
rc = process.wait(10)
break
except subprocess.TimeoutExpired:
logger.warning("feature check command \"%s\" did not return after 10 seconds!", command)
process.kill()
if expected_result is None:
return rc != 32512
else: