go/src/cmd
Manlio Perillo 805b4d5636 cmd/dist: wait for exit in bgwait after a fatal error
Currently, when a command scheduled by bgrun fails, bgwait returns to
the caller even in case the fatal error was detected.

In case of a syntax error in one of the standard packages, as an
example, the runInstall function will try to read the generated archive
file, only to fail since the file does not exist.  Since the runInstall
function is called in a goroutine, cmd/dist will continue to report
errors until all background goroutines are done.

Update the bgwait function to wait until program termination in case of
a fatal error, since returning to the caller (with an error, as an
example) will cause cmd/dist to report an additional error during the
next build phase.

Fixes #45410

Change-Id: If89976abad70f8d6ec79b2a5a1f2306e9c034c5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/320311
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-09 21:58:03 +00:00
..
addr2line
api all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
asm cmd/{asm,compile,internal/obj}: add "maymorestack" support 2021-11-05 00:52:06 +00:00
buildid
cgo cmd: move internal/str back to cmd/go 2021-10-27 16:39:27 +00:00
compile cmd/compile: add line number test for #49436 2021-11-09 20:47:54 +00:00
cover cmd/cover: use fmt.Print for newline-ending fixed string 2021-11-04 00:19:43 +00:00
dist cmd/dist: wait for exit in bgwait after a fatal error 2021-11-09 21:58:03 +00:00
doc cmd/doc, go/doc: add basic support for generic code 2021-11-04 14:54:46 +00:00
fix cmd/fix: add buildtag fix 2021-10-28 17:52:59 +00:00
go cmd/go: add //go:embed all:pattern 2021-11-09 18:03:59 +00:00
gofmt go/types, types2, go/ast, go/parser: remove support for type lists 2021-10-28 15:34:22 +00:00
internal cmd/link: enable internal linking of PIE binaries on ppc64le 2021-11-05 19:14:22 +00:00
link cmd/link: fix GCC startfiles names on AIX 2021-11-09 18:37:32 +00:00
nm all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
objdump cmd/objdump: print full disassembly when testing with -v 2021-10-04 22:54:58 +00:00
pack
pprof all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
test2json
trace cmd/trace: use fmt.Print for newline-ending fixed string 2021-11-04 00:36:13 +00:00
vendor all: update vendored golang.org/x/tools for Go 1.18 release 2021-11-09 20:10:50 +00:00
vet all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
README.vendor
go.mod all: update vendored golang.org/x/tools for Go 1.18 release 2021-11-09 20:10:50 +00:00
go.sum all: update vendored golang.org/x/tools for Go 1.18 release 2021-11-09 20:10:50 +00:00

README.vendor

See src/README.vendor for information on loading vendored packages
and updating the vendor directory.