Merge pull request #2383 from jpetazzo/cleanup-errclosedpipe-for-stdin

Ignore ErrClosedPipe for stdin in Container.Attach.
Upstream-commit: 217b6070f0649b15f3b45477a27a671411ba6884
Component: engine
This commit is contained in:
Michael Crosby
2013-10-24 17:18:28 -07:00

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
}()
}
}