瀏覽代碼

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)