diff options
Diffstat (limited to 'mesonbuild/scripts/meson_exe.py')
| -rw-r--r-- | mesonbuild/scripts/meson_exe.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 9c1ae596c..dc89876be 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -32,7 +32,7 @@ def buildparser() -> argparse.ArgumentParser: parser.add_argument('--feed') return parser -def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[dict] = None) -> int: +def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[T.Dict[str, str]] = None) -> int: if exe.exe_runner: if not exe.exe_runner.found(): raise AssertionError('BUG: Can\'t run cross-compiled exe {!r} with not-found ' @@ -67,6 +67,9 @@ def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[dict] = None) -> close_fds=False, stdin=stdin, stdout=pipe, stderr=pipe) stdout, stderr = p.communicate() + if stdin is not None: + stdin.close() + if p.returncode == 0xc0000135: # STATUS_DLL_NOT_FOUND on Windows indicating a common problem that is otherwise hard to diagnose raise FileNotFoundError('due to missing DLLs') |
