1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:10:24 -07:00

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/22581
Reviewed-by: Ahmed W. <oneofone@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-04-28 15:16:46 -05:00
parent 6c11e2710e
commit 1b591dfb1f

View File

@ -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():