Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(74)

Issue 5700070: code review 5700070: cmd/dist: force line-buffering stdout/stderr on Unix (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by minux1
Modified:
13 years ago
Reviewers:
iant2
CC:
r, rsc, golang-dev
Visibility:
Public.

Description

cmd/dist: force line-buffering stdout/stderr on Unix If stdout and stderr are indeed the same file (not a tty), which is often the case, fully-buffered stdout will make it harder to see progresses, for example, ./make.bash 2>&1 | tee log

Patch Set 1 #

Patch Set 2 : diff -r 767b6229d4dc https://code.google.com/p/go/ #

Patch Set 3 : diff -r 9fa2b8dc359b https://code.google.com/p/go/ #

Patch Set 4 : diff -r 9fa2b8dc359b https://code.google.com/p/go/ #

Total comments: 1

Patch Set 5 : diff -r 5411050a8397 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M src/cmd/dist/unix.c View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 8
minux1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
13 years ago (2012-02-25 19:06:34 UTC) #1
r
i like it as is. if we don't buffer, someone will come back and add ...
13 years ago (2012-02-28 00:28:49 UTC) #2
minux1
On 2012/02/28 00:28:49, r wrote: > i like it as is. if we don't buffer, ...
13 years ago (2012-02-28 04:46:15 UTC) #3
rsc
http://codereview.appspot.com/5700070/diff/3003/src/cmd/dist/unix.c File src/cmd/dist/unix.c (right): http://codereview.appspot.com/5700070/diff/3003/src/cmd/dist/unix.c#newcode644 src/cmd/dist/unix.c:644: setvbuf(stdout, nil, _IOLBF, 0); I don't believe this is ...
13 years ago (2012-02-28 17:13:58 UTC) #4
minux1
On 2012/02/28 17:13:58, rsc wrote: > http://codereview.appspot.com/5700070/diff/3003/src/cmd/dist/unix.c > File src/cmd/dist/unix.c (right): > > http://codereview.appspot.com/5700070/diff/3003/src/cmd/dist/unix.c#newcode644 > ...
13 years ago (2012-02-28 17:23:45 UTC) #5
rsc
LGTM Maybe I was remembering trouble on Windows, but that doesn't concern this file. Try ...
13 years ago (2012-02-28 18:08:27 UTC) #6
minux1
*** Submitted as http://code.google.com/p/go/source/detail?r=eabeb88b4bb7 *** cmd/dist: force line-buffering stdout/stderr on Unix If stdout and stderr ...
13 years ago (2012-02-28 18:22:37 UTC) #7
iant2
13 years ago (2012-02-28 18:32:28 UTC) #8
rsc@golang.org writes:

> src/cmd/dist/unix.c:644: setvbuf(stdout, nil, _IOLBF, 0);
> I don't believe this is available on OS X.

setvbuf is in C89 and should be available everywhere.

Ian
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b