Close the containers stdin when the process dies

Upstream-commit: 47607494027be3d37cbb01a07e026e99f9c5151b
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-03-30 09:08:53 -07:00
parent 4a407f8199
commit 10d17433d1

View File

@ -382,6 +382,11 @@ func (container *Container) monitor() {
if err := container.releaseNetwork(); err != nil {
log.Printf("%v: Failed to release network: %v", container.Id, err)
}
if container.Config.OpenStdin {
if err := container.stdin.Close(); err != nil {
Debugf("%s: Error close stdin: %s", container.Id, err)
}
}
if err := container.stdout.Close(); err != nil {
Debugf("%s: Error close stdout: %s", container.Id, err)
}