mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: do not share underlying envs/argv array
Removes a potential data race between os.Setenv and runtime.GOROOT, along with a bug where os.Setenv would only sometimes change the value of runtime.GOROOT. Change-Id: I7d2a905115c667ea6e73f349f3784a1d3e8f810d Reviewed-on: https://go-review.googlesource.com/6611 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
ac080fa6d8
commit
402f71a839
3 changed files with 46 additions and 2 deletions
|
|
@ -122,3 +122,6 @@ var Open = open
|
|||
var Close = close
|
||||
var Read = read
|
||||
var Write = write
|
||||
|
||||
func Envs() []string { return envs }
|
||||
func SetEnvs(e []string) { envs = e }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue