From 64153ace05955e90e2c11dea3b64d86d23d12eb3 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 22 Jun 2023 10:02:26 +0200 Subject: [PATCH] podman wait: update man page While reading the code I found the man page to be lacking some information that I found worth mentioning and clarifying. In particular, how the command behaves with respect to exit codes and when more than one condition is specified. Signed-off-by: Valentin Rothberg --- docs/source/markdown/podman-wait.1.md.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/markdown/podman-wait.1.md.in b/docs/source/markdown/podman-wait.1.md.in index a946a9bcd5..ab4c7c0fb7 100644 --- a/docs/source/markdown/podman-wait.1.md.in +++ b/docs/source/markdown/podman-wait.1.md.in @@ -11,8 +11,10 @@ podman\-wait - Wait on one or more containers to stop and print their exit codes ## DESCRIPTION Waits on one or more containers to stop. The container can be referred to by its name or ID. In the case of multiple containers, Podman waits on each consecutively. -After all specified containers are stopped, the containers' return codes are printed -separated by newline in the same order as they were given to the command. +After all conditions are satisfied, the containers' return codes are printed +separated by newline in the same order as they were given to the command. An +exit code of -1 is emitted for all conditions other than "stopped" and +"exited". NOTE: there is an inherent race condition when waiting for containers with a restart policy of `always` or `on-failure`, such as those created by `podman @@ -22,7 +24,7 @@ with different exit codes, but `podman wait` can only display and detect one. ## OPTIONS #### **--condition**=*state* -Condition to wait on (default "stopped") +Container state or condition to wait for. Can be specified multiple times where at least one condition must match for the command to return. Supported values are "created", "exited", "initialized", "paused", "removing", "running", "stopped", "stopping". The default condition is "stopped". #### **--help**, **-h**