Files
docker-machine/libmachine
Cezar Sa Espinola 55bfb59b67 plugin/localbinary: Exit output stream goroutines when plugin closes
This commit ensures that when a plugin instance is closed the goroutines
responsible for streaming stdout and stderr of the called binary will
also exit, preventing a goroutines leak.

Before this commit these goroutines could stay blocked forever if
Close() was called while the binary still had some pending output.

I found this bug after debugging a real world goroutine leak, the
goroutines dump would show thousands of goroutines at:

```
github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary.stream(0xc023013d80, 0xc0000aad20)
	/home/travis/gopath/src/github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary/plugin.go:177 +0x7c
created by github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary.(*Plugin).AttachStream
	/home/travis/gopath/src/github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary/plugin.go:183 +0x67
```

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
2019-01-08 14:45:53 -08:00
..
2016-08-15 10:34:46 +02:00
2015-11-13 16:27:50 +01:00
2016-01-07 12:32:55 +01:00
2017-10-02 19:14:56 -07:00
2017-10-10 17:31:20 -07:00
2017-10-02 13:44:36 -07:00
2015-11-04 14:17:58 -08:00
2015-11-05 13:34:07 -08:00