From 40c7b53791b598364ffe2290c88875e4fc65be11 Mon Sep 17 00:00:00 2001 From: "Vojtech Vitek (V-Teq)" Date: Thu, 21 Aug 2014 10:06:32 +0200 Subject: [PATCH] Fix #6509: Interactive container hangs when redirecting stdout Cli IsTerminal() SYS_IOCTL operation should be determined from STDIN, not from STDOUT. Signed-off-by: Vojtech Vitek (V-Teq) --- api/client/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client/cli.go b/api/client/cli.go index 6346d30cac..a158fc7d3c 100644 --- a/api/client/cli.go +++ b/api/client/cli.go @@ -104,7 +104,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, proto, addr string, tlsC } if in != nil { - if file, ok := out.(*os.File); ok { + if file, ok := in.(*os.File); ok { terminalFd = file.Fd() isTerminal = term.IsTerminal(terminalFd) }