Pārlūkot izejas kodu

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) <vvitek@redhat.com>
Vojtech Vitek (V-Teq) 11 gadi atpakaļ
vecāks
revīzija
40c7b53791
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      api/client/cli.go

+ 1 - 1
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 in != nil {
-		if file, ok := out.(*os.File); ok {
+		if file, ok := in.(*os.File); ok {
 			terminalFd = file.Fd()
 			terminalFd = file.Fd()
 			isTerminal = term.IsTerminal(terminalFd)
 			isTerminal = term.IsTerminal(terminalFd)
 		}
 		}