1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Revert bug 1497976 as close_fds on Python 2 is too slow
diff --git build/moz.configure/util.configure build/moz.configure/util.configure
index 25862fee7c32..3fc725a5124e 100644
--- build/moz.configure/util.configure
+++ build/moz.configure/util.configure
@@ -22,20 +22,13 @@ def configure_error(message):
# A wrapper to obtain a process' output and return code.
# Returns a tuple (retcode, stdout, stderr).
-@imports('os')
@imports('subprocess')
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='mozbuild.util', _import='system_encoding')
def get_cmd_output(*args, **kwargs):
log.debug('Executing: `%s`', quote(*args))
proc = subprocess.Popen(args, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- # On Python 2 on Windows, close_fds prevents the
- # process from inheriting stdout/stderr.
- # Elsewhere, it simply prevents it from inheriting
- # extra file descriptors, which is what we want.
- close_fds=os.name != 'nt',
- **kwargs)
+ stderr=subprocess.PIPE, **kwargs)
stdout, stderr = proc.communicate()
stdout = stdout.decode(system_encoding, 'replace')
stderr = stderr.decode(system_encoding, 'replace')
|