summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-21 18:35:43 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-21 18:35:43 +0000
commitc690627aa298da9f7f1718f6fbdf8b80a6655296 (patch)
treee7a5a30506a6b5bb1742616ec55ac19d2f1d80ee /tools/clang
parent6f7cb2281335a8952a064ec009933e46a66e64cd (diff)
downloadchromium_src-c690627aa298da9f7f1718f6fbdf8b80a6655296.zip
chromium_src-c690627aa298da9f7f1718f6fbdf8b80a6655296.tar.gz
chromium_src-c690627aa298da9f7f1718f6fbdf8b80a6655296.tar.bz2
clang: Fix spurious '../llvm/configure: line 541: 0: Bad file descriptor' on clang roll try jobs.
The subprocess module used to dup() stdin, but apparently that's no longer true. So dup it manually. Patch from Jay Soffian <jaysoffian@gmail.com>! BUG=none TEST=Put a new clang revision in tools/clang/scripts/update.sh, send try job. Works. Review URL: http://codereview.chromium.org/9430007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rwxr-xr-xtools/clang/scripts/update.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 6983619..bdc781f 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -21,14 +21,13 @@ def main():
# output processing that breaks printing '\r' characters for single-line
# updating status messages as printed by curl and wget.
# Work around this by setting stderr of the update.sh process to stdin (!):
- # gclient doesn't redirect stdin, and while stdin itself is read-only, the
- # subprocess module dup()s it in the child process - and a dup()ed sys.stdin
- # is writable, try
+ # gclient doesn't redirect stdin, and while stdin itself is read-only, a
+ # dup()ed sys.stdin is writable, try
# fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi')
# TODO: Fix gclient instead, http://crbug.com/95350
return subprocess.call(
[os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:],
- stderr=sys.stdin)
+ stderr=os.fdopen(os.dup(sys.stdin.fileno())))
if __name__ == '__main__':