Remove close_fds=True from StaticSubprocess

Per the documentation, on Linux, the default is true.  On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/173>
Fixes: bb3f414128 ("Cache scons subprocess calls")
This commit is contained in:
Kp 2016-01-03 20:21:36 +00:00
parent e3e77f8724
commit 0a2ef79242

View file

@ -64,7 +64,7 @@ class StaticSubprocess:
return _call_cache[a]
except KeyError:
pass
p = subprocess.Popen(args, executable=args[0], stdout=subprocess.PIPE, stderr=stderr, close_fds=True)
p = subprocess.Popen(args, executable=args[0], stdout=subprocess.PIPE, stderr=stderr)
(o, e) = p.communicate()
_call_cache[a] = c = _CachedCall(o, e, p.wait())
return c