mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach
This commit is contained in:
parent
0767916ade
commit
64c1b6d9cd
1 changed files with 1 additions and 4 deletions
|
@ -250,10 +250,7 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
||||||
if cStderr != nil {
|
if cStderr != nil {
|
||||||
defer cStderr.Close()
|
defer cStderr.Close()
|
||||||
}
|
}
|
||||||
if container.Config.StdinOnce {
|
if container.Config.StdinOnce && !container.Config.Tty {
|
||||||
if container.Config.Tty {
|
|
||||||
defer container.Kill()
|
|
||||||
}
|
|
||||||
defer cStdin.Close()
|
defer cStdin.Close()
|
||||||
}
|
}
|
||||||
_, err := io.Copy(cStdin, stdin)
|
_, err := io.Copy(cStdin, stdin)
|
||||||
|
|
Loading…
Reference in a new issue