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

Ignore ErrClosedPipe for stdin in Container.Attach.
This commit is contained in:
Michael Crosby 2013-10-24 17:18:28 -07:00
commit 217b6070f0
1 changed files with 4 additions and 2 deletions

View File

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