1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Ignore ErrClosedPipe for stdin in Container.Attach.

But pass `err` in the error channel anyway; don't ignore it anymore.
This commit is contained in:
Jérôme Petazzoni 2013-10-24 13:00:51 -07:00
parent e661473bcd
commit b9eb5e04ae

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