From d84da75f01e0a0d20fbddb8b051a325e3b21eded Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Thu, 22 Mar 2018 09:38:59 -0700 Subject: [PATCH] daemon: use context error rather than inventing new one Signed-off-by: Stephen J Day --- daemon/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/exec.go b/daemon/exec.go index 89c3c8969a..6a94aca417 100644 --- a/daemon/exec.go +++ b/daemon/exec.go @@ -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 {