aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-01-19 22:07:20 -0800
committerIan Lance Taylor <iant@golang.org>2017-01-20 21:12:54 +0000
commit1be957d703832aa10952c4dc799dcc3a39f48aff (patch)
treeb7090829fa9db66e52f2a41f780d2e34e38dbd05
parentec654e2251f0104ee63eff57fba2749da2f177e5 (diff)
downloadgo-1be957d703832aa10952c4dc799dcc3a39f48aff.tar.gz
go-1be957d703832aa10952c4dc799dcc3a39f48aff.zip
misc/cgo/test: pass current environment to syscall.Exec
This is needed for typical tests with gccgo, as it passes the LD_LIBRARY_PATH environment variable to the new program. Change-Id: I9bf4b0dbdff63f5449c7fcb8124eaeab10ed7f34 Reviewed-on: https://go-review.googlesource.com/35481 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--misc/cgo/test/issue18146.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/cgo/test/issue18146.go b/misc/cgo/test/issue18146.go
index ffb04e9037..3c600463f0 100644
--- a/misc/cgo/test/issue18146.go
+++ b/misc/cgo/test/issue18146.go
@@ -73,7 +73,7 @@ func test18146(t *testing.T) {
}
runtime.GOMAXPROCS(threads)
argv := append(os.Args, "-test.run=NoSuchTestExists")
- if err := syscall.Exec(os.Args[0], argv, nil); err != nil {
+ if err := syscall.Exec(os.Args[0], argv, os.Environ()); err != nil {
t.Fatal(err)
}
}