Merge pull request #20647 from coolljt0725/fix_20638

Fix exec start api with detach and AttachStdin at same time. fixes #2…
Upstream-commit: cee4ff1c4ac0bb47ed847f3bb725fd6233613937
Component: engine
This commit is contained in:
David Calavera
2016-02-24 20:17:15 -08:00
2 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ func (d *Daemon) ContainerExecStart(name string, stdin io.ReadCloser, stdout io.
logrus.Debugf("starting exec command %s in container %s", ec.ID, c.ID)
d.LogContainerEvent(c, "exec_start: "+ec.ProcessConfig.Entrypoint+" "+strings.Join(ec.ProcessConfig.Arguments, " "))
if ec.OpenStdin {
if ec.OpenStdin && stdin != nil {
r, w := io.Pipe()
go func() {
defer w.Close()