We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3452d80 commit 3672a09Copy full SHA for 3672a09
src/runtime/debug/example_monitor_test.go
@@ -84,7 +84,10 @@ func monitor() {
84
log.Fatal(err)
85
}
86
cmd := exec.Command(exe, "-test.run=^ExampleSetCrashOutput_monitor$")
87
- cmd.Env = append(os.Environ(), monitorVar+"=1")
+ // Be selective in which variables we allow the child to inherit.
88
+ // Depending on the application, some may be necessary,
89
+ // while others (e.g. GOGC, GOMEMLIMIT) may be harmful; see #73490.
90
+ cmd.Env = []string{monitorVar + "=1"}
91
cmd.Stderr = os.Stderr
92
cmd.Stdout = os.Stderr
93
pipe, err := cmd.StdinPipe()
0 commit comments