mirror of
https://github.com/golang/go
synced 2024-11-12 07:00:21 -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:
parent
6c11e2710e
commit
1b591dfb1f
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user