aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_exec.go')
-rw-r--r--libpod/container_exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index c359f1e5d..09a5b9597 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -761,6 +761,9 @@ func (c *Container) Exec(config *ExecConfig, streams *define.AttachStreams, resi
}
exitCode := session.ExitCode
if err := c.ExecRemove(sessionID, false); err != nil {
+ if errors.Cause(err) == define.ErrNoSuchExecSession {
+ return exitCode, nil
+ }
return -1, err
}