소스 검색

Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach

Guillaume J. Charmes 12 년 전
부모
커밋
64c1b6d9cd
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      container.go

+ 1 - 4
container.go

@@ -250,10 +250,7 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 				if cStderr != nil {
 					defer cStderr.Close()
 				}
-				if container.Config.StdinOnce {
-					if container.Config.Tty {
-						defer container.Kill()
-					}
+				if container.Config.StdinOnce && !container.Config.Tty {
 					defer cStdin.Close()
 				}
 				_, err := io.Copy(cStdin, stdin)