Skip to content

cmd/dist: child process prints to log after make.bash has exited #25981

Description

@alandonovan
$ cd goroot/src
$ git reset --hard dd0e7a9 # pristine recent snapshot
$ echo  "doesn't compile" >> cmd/go/internal/list/list.go
$ ./make.bash
Building Go cmd/dist using /usr/local/google/home/adonovan/go1.6.
Building Go toolchain1 using /usr/local/google/home/adonovan/go1.6.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
/usr/local/google/home/adonovan/goroot2/src/cmd/go/internal/list/list.go:421:1: syntax error: non-declaration statement outside function body
/usr/local/google/home/adonovan/goroot2/src/cmd/go/internal/list/list.go:421:16: newline in character literal
go tool dist: FAILED: /usr/local/google/home/adonovan/goroot2/pkg/tool/linux_amd64/compile -std -pack -o /tmp/go-tool-dist-385632282/cmd/go/internal/list/_go_.a -p cmd/go/internal/list /usr/local/google/home/adonovan/goroot2/src/cmd/go/internal/list/context.go /usr/local/google/home/adonovan/goroot2/src/cmd/go/internal/list/list.go: exit status 2
$ can't create /tmp/go-tool-dist-385632282/cmd/go/internal/run/_go_.a: open /tmp/go-tool-dist-385632282/cmd/go/internal/run/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-385632282/cmd/go/internal/vet/_go_.a: open /tmp/go-tool-dist-385632282/cmd/go/internal/vet/_go_.a: no such file or directory
...

Notice the $ sign appearing in the middle of the output. This indicates that make.bash exited and the shell printed its prompt, but some child process of make.bash is still printing log output. make.bash should wait for its children to exit before exiting itself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions