dotcloud/docker — pull request #7219 by VojtechVitek (2014-07-24 18:51:34+00:00)
Title: Fix data race in client hijack

Fixes:
```
---> Making bundle: cross (in bundles/1.1.1-dev/cross)
Created symlinks: /go/src/github.com/dotcloud/docker/bundles/1.1.1-dev/cross/linux/amd64/docker /go/src/github.com/dotcloud/docker/bundles/1.1.1-dev/cross/linux/amd64/docker-1.1.1-dev /go/src/github.com/dotcloud/docker/bundles/1.1.1-dev/cross/linux/amd64/docker-1.1.1-dev.md5 /go/src/github.com/dotcloud/docker/bundles/1.1.1-dev/cross/linux/amd64/docker-1.1.1-dev.sha256
go build: -race is only supported on linux/amd64, darwin/amd64 and windows/amd64
==================
WARNING: DATA RACE
Write by goroutine 13:
os.(*file).close()
/usr/local/go/src/pkg/os/file_unix.go:113 +0x184
os.(*File).Close()
/usr/local/go/src/pkg/os/file_unix.go:102 +0x82
github.com/dotcloud/docker/api/client.func·015()
/go/src/github.com/dotcloud/docker/api/client/hijack.go:85 +0x12b
github.com/dotcloud/docker/api/client.func·016()
/go/src/github.com/dotcloud/docker/api/client/hijack.go:98 +0x266
github.com/dotcloud/docker/utils.func·001()
/go/src/github.com/dotcloud/docker/utils/utils.go:44 +0x4e

Previous read by goroutine 14:
os.(*File).read()
/usr/local/go/src/pkg/os/file_unix.go:180 +0x5d
os.(*File).Read()
/usr/local/go/src/pkg/os/file.go:95 +0xbb
io.Copy()
/usr/local/go/src/pkg/io/io.go:352 +0x1da
github.com/dotcloud/docker/api/client.func·017()
/go/src/github.com/dotcloud/docker/api/client/hijack.go:103 +0xf3
github.com/dotcloud/docker/utils.func·001()
/go/src/github.com/dotcloud/docker/utils/utils.go:44 +0x4e

Goroutine 13 (running) created at:
github.com/dotcloud/docker/utils.Go()
/go/src/github.com/dotcloud/docker/utils/utils.go:45 +0xf7
github.com/dotcloud/docker/api/client.(*DockerCli).hijack()
/go/src/github.com/dotcloud/docker/api/client/hijack.go:98 +0xde1
github.com/dotcloud/docker/api/client.func·013()
/go/src/github.com/dotcloud/docker/api/client/commands.go:2121 +0x281
github.com/dotcloud/docker/utils.func·001()
/go/src/github.com/dotcloud/docker/utils/utils.go:44 +0x4e

Goroutine 14 (running) created at:
github.com/dotcloud/docker/utils.Go()
/go/src/github.com/dotcloud/docker/utils/utils.go:45 +0xf7
github.com/dotcloud/docker/api/client.(*DockerCli).hijack()
/go/src/github.com/dotcloud/docker/api/client/hijack.go:117 +0x9a5
github.com/dotcloud/docker/api/client.func·013()
/go/src/github.com/dotcloud/docker/api/client/commands.go:2121 +0x281
github.com/dotcloud/docker/utils.func·001()
/go/src/github.com/dotcloud/docker/utils/utils.go:44 +0x4e
```