]> Cypherpunks repositories - gostls13.git/commit
cmd/go: skip updateBuildID on binaries we will run
authorRuss Cox <rsc@golang.org>
Wed, 18 Oct 2017 01:48:47 +0000 (21:48 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 19 Oct 2017 15:41:09 +0000 (15:41 +0000)
commitd790ea3ef1152cd8aded824ffca50a8c56577469
tree781bfc6c6d811812faf021a2fa93c5645d9d886a
parent52dd39965e78260145091226490ee5510ea34ced
cmd/go: skip updateBuildID on binaries we will run

On modern Unix systems it is basically impossible for a multithreaded
program to open a binary for write, close it, and then fork+exec that
same binary. So don't write the binary if we're going to fork+exec it.

This fixes the ETXTBSY flakes.

Fixes #22220.
See also #22315.

Change-Id: I6be4802fa174726ef2a93d5b2f09f708da897cdb
Reviewed-on: https://go-review.googlesource.com/71570
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/internal/work/build.go