Merge pull request #36670 from stevvooe/use-context-error

daemon: use context error rather than inventing new one
Upstream-commit: 766d9edf39b79e11018bb0f55056b5bd915ddf3c
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2018-03-22 20:45:20 +01:00
committed by GitHub

View File

@ -270,7 +270,7 @@ func (d *Daemon) ContainerExecStart(ctx context.Context, name string, stdin io.R
case <-attachErr:
// TERM signal worked
}
return fmt.Errorf("context cancelled")
return ctx.Err()
case err := <-attachErr:
if err != nil {
if _, ok := err.(term.EscapeError); !ok {