Ignore ErrClosedPipe for stdin in Container.Attach.

But pass `err` in the error channel anyway; don't ignore it anymore.
Upstream-commit: b9eb5e04aeac870a9a45ae8961cfb3578af26787
Component: engine
This commit is contained in:
Jérôme Petazzoni
2013-10-24 15:04:58 -07:00
parent fe31da6fd6
commit a76023f483
+4 -2
View File
@@ -470,11 +470,13 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
} else {
_, err = io.Copy(cStdin, stdin)
}
if err == io.ErrClosedPipe {
err = nil
}
if err != nil {
utils.Errorf("attach: stdin: %s", err)
}
// Discard error, expecting pipe error
errors <- nil
errors <- err
}()
}
}