diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-04 00:38:24 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-04 00:38:24 +0000 |
commit | 2adb3cd64e39b4ecb6decedfdc05e3f59376f39b (patch) | |
tree | 3a27766f6ca9f414118503f6507e84486ca9fcd1 /tools/clang | |
parent | 33c6d3f12211d716768ab195be90d598cd2bd364 (diff) | |
download | chromium_src-2adb3cd64e39b4ecb6decedfdc05e3f59376f39b.zip chromium_src-2adb3cd64e39b4ecb6decedfdc05e3f59376f39b.tar.gz chromium_src-2adb3cd64e39b4ecb6decedfdc05e3f59376f39b.tar.bz2 |
Ugly workaround that makes `gclient runhooks` output un-ugly.
BUG=95350
TEST=`gclient runhooks` on mac looks "normal" when clang is downloaded.
TBR=maruel
Review URL: http://codereview.chromium.org/7835017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rw-r--r-- | tools/clang/scripts/update.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index 6fe0653..887b089 100644 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -13,5 +13,17 @@ import sys if __name__ == '__main__': if sys.platform in ['win32', 'cygwin']: sys.exit(0) + + # This script is called by gclient. gclient opens its hooks subprocesses with + # (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does custom + # 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 + # fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi') + # TODO: Fix gclient instead, http://crbug.com/95350 subprocess.call( - [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:]) + [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:], + stderr=sys.stdin) |