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

Upstream-commit: 64c1b6d9cd16b7d4cc8ebda2de82bc76e0c99f43
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-04-09 08:18:16 -07:00
parent 7c684984e1
commit e37ef931cd

View File

@ -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)