Skip to content

Commit

Permalink
podman wait: update man page
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vrothberg committed Jun 23, 2023
1 parent 49e0bde commit 64153ac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/markdown/podman-wait.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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**

Expand Down

0 comments on commit 64153ac

Please sign in to comment.