Merge pull request #2383 from jpetazzo/cleanup-errclosedpipe-for-stdin
Ignore ErrClosedPipe for stdin in Container.Attach.
This commit is contained in:
commit
217b6070f0
|
@ -470,11 +470,13 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
||||||
} else {
|
} else {
|
||||||
_, err = io.Copy(cStdin, stdin)
|
_, err = io.Copy(cStdin, stdin)
|
||||||
}
|
}
|
||||||
|
if err == io.ErrClosedPipe {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Errorf("attach: stdin: %s", err)
|
utils.Errorf("attach: stdin: %s", err)
|
||||||
}
|
}
|
||||||
// Discard error, expecting pipe error
|
errors <- err
|
||||||
errors <- nil
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue