Skip Close()-ing stdin on Darwin. The Return.

This was accidentally removed in https://github.com/docker/docker/pull/16289
Now adding it back.

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2016-02-01 20:28:40 -05:00
parent 680cf1c8f4
commit 51795c0836
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ func (cli *DockerCli) restoreTerminal(in io.Closer) error {
if cli.state != nil {
term.RestoreTerminal(cli.inFd, cli.state)
}
if in != nil {
// WARNING: DO NOT REMOVE THE OS CHECK !!!
// For some reason this Close call blocks on darwin..
// As the client exists right after, simply discard the close
// until we find a better solution.
if in != nil && runtime.GOOS != "darwin" {
return in.Close()
}
return nil