From 82ac0d8925dbb5aa738f1494ecb002eb6daca992 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 7 Sep 2019 05:47:05 -0400 Subject: Podman-remote run should wait for exit code This change matches what is happening on the podman local side and should eliminate a race condition. Also exit commands on the server side should start to return to client. Signed-off-by: Daniel J Walsh --- pkg/adapter/containers.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'pkg/adapter/containers.go') diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index 2ce437828..47db5c0dc 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -396,14 +396,7 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode // Do not perform cleanup, or wait for container exit code // Just exit immediately if errors.Cause(err) == define.ErrDetach { - exitCode = 0 - return exitCode, nil - } - // This means the command did not exist - exitCode = 127 - e := strings.ToLower(err.Error()) - if strings.Contains(e, "permission denied") || strings.Contains(e, "operation not permitted") { - exitCode = 126 + return 0, nil } if c.IsSet("rm") { if deleteError := r.Runtime.RemoveContainer(ctx, ctr, true, false); deleteError != nil { -- cgit v1.2.3-54-g00ecf