mirror of
https://github.com/golang/go.git
synced 2025-05-20 06:43:26 +00:00
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 R=r, rsc CC=golang-dev https://golang.org/cl/5700070
This commit is contained in:
parent
fb1a5fcacf
commit
26daf6a03f
3
src/cmd/dist/unix.c
vendored
3
src/cmd/dist/unix.c
vendored
@ -641,6 +641,9 @@ main(int argc, char **argv)
|
||||
Buf b;
|
||||
struct utsname u;
|
||||
|
||||
setvbuf(stdout, nil, _IOLBF, 0);
|
||||
setvbuf(stderr, nil, _IOLBF, 0);
|
||||
|
||||
binit(&b);
|
||||
|
||||
slash = "/";
|
||||
|
Loading…
x
Reference in New Issue
Block a user