From 2c45eb2fa95ce49ce47996be4d7b3204105fedc1 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Mon, 1 Feb 2016 20:28:40 -0500 Subject: [PATCH] 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 Upstream-commit: 51795c083624b106fe7f338213cbc3d3812f31af Component: engine --- components/engine/api/client/cli.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/engine/api/client/cli.go b/components/engine/api/client/cli.go index b1637b0204..fd47fccfa4 100644 --- a/components/engine/api/client/cli.go +++ b/components/engine/api/client/cli.go @@ -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