diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-07-27 14:27:45 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-09-24 09:44:40 -0700 |
commit | 0a5e96aafef80b809f46c431ce688b6c00fa236d (patch) | |
tree | 06f16d4de5aec519b86fda7adc71b5476175728e | |
parent | c8d85575c0029d362c0805520e129e8ac6dea2a2 (diff) | |
download | meson-0a5e96aafef80b809f46c431ce688b6c00fa236d.zip meson-0a5e96aafef80b809f46c431ce688b6c00fa236d.tar.gz meson-0a5e96aafef80b809f46c431ce688b6c00fa236d.tar.bz2 |
scripts/meson_exe: close fd if we open it
-rw-r--r-- | mesonbuild/scripts/meson_exe.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 9c1ae59..cd3534c 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -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') |