Commit 1b591dfb authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

os/exec: fix variable shadow, don't leak goroutine

Goroutine leak checking is still too tedious, so untested.

See #6705 which is my fault for forgetting to mail out.

Change-Id: I899fb311c9d4229ff1dbd3f54fe307805e17efee
Reviewed-on: https://go-review.googlesource.com/22581Reviewed-by: 's avatarAhmed W. <oneofone@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 6c11e271
......@@ -412,7 +412,7 @@ func (c *Cmd) WaitContext(ctx context.Context) error {
var waitDone chan struct{}
if ctx != nil {
waitDone := make(chan struct{})
waitDone = make(chan struct{})
go func() {
select {
case <-ctx.Done():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment