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 --- libpod/container_api.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libpod') diff --git a/libpod/container_api.go b/libpod/container_api.go index b1c2caa81..4f0d5301c 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -821,3 +821,12 @@ func (c *Container) Restore(ctx context.Context, options ContainerCheckpointOpti defer c.newContainerEvent(events.Restore) return c.restore(ctx, options) } + +// AutoRemove indicates whether the container will be removed after it is executed +func (c *Container) AutoRemove() bool { + spec := c.config.Spec + if spec.Annotations == nil { + return false + } + return c.Spec().Annotations[InspectAnnotationAutoremove] == InspectResponseTrue +} -- cgit v1.2.3-54-g00ecf