Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-bug1507655
Revert bug 1497976 as close_fds on Python 2 is too slow | Revert bug 1497976 as close_fds on Python 2 is too slow | ||||
diff --git build/moz.configure/util.configure build/moz.configure/util.configure | diff --git build/moz.configure/util.configure build/moz.configure/util.configure | ||||
index 25862fee7c32..3fc725a5124e 100644 | index 25862fee7c32..3fc725a5124e 100644 | ||||
--- build/moz.configure/util.configure | --- build/moz.configure/util.configure | ||||
+++ build/moz.configure/util.configure | +++ build/moz.configure/util.configure | ||||
@@ -22,7 +22,6 @@ | @@ -22,20 +22,13 @@ def configure_error(message): | ||||
# A wrapper to obtain a process' output and return code. | # A wrapper to obtain a process' output and return code. | ||||
# Returns a tuple (retcode, stdout, stderr). | # Returns a tuple (retcode, stdout, stderr). | ||||
-@imports('os') | -@imports('os') | ||||
@imports(_from='__builtin__', _import='unicode') | |||||
@imports('subprocess') | @imports('subprocess') | ||||
@imports(_from='mozbuild.shellutil', _import='quote') | @imports(_from='mozbuild.shellutil', _import='quote') | ||||
@@ -45,13 +44,7 @@ | @imports(_from='mozbuild.util', _import='system_encoding') | ||||
def get_cmd_output(*args, **kwargs): | |||||
log.debug('Executing: `%s`', quote(*args)) | log.debug('Executing: `%s`', quote(*args)) | ||||
proc = subprocess.Popen(args, stdout=subprocess.PIPE, | proc = subprocess.Popen(args, stdout=subprocess.PIPE, | ||||
- stderr=subprocess.PIPE, | - stderr=subprocess.PIPE, | ||||
- # On Python 2 on Windows, close_fds prevents the | - # On Python 2 on Windows, close_fds prevents the | ||||
- # process from inheriting stdout/stderr. | - # process from inheriting stdout/stderr. | ||||
- # Elsewhere, it simply prevents it from inheriting | - # Elsewhere, it simply prevents it from inheriting | ||||
- # extra file descriptors, which is what we want. | - # extra file descriptors, which is what we want. | ||||
- close_fds=os.name != 'nt', | - close_fds=os.name != 'nt', | ||||
- **kwargs) | - **kwargs) | ||||
+ stderr=subprocess.PIPE, **kwargs) | + stderr=subprocess.PIPE, **kwargs) | ||||
stdout, stderr = proc.communicate() | stdout, stderr = proc.communicate() | ||||
return proc.wait(), stdout, stderr | stdout = stdout.decode(system_encoding, 'replace') | ||||
stderr = stderr.decode(system_encoding, 'replace') |