Merge pull request #4974 from rhatdan/man

Cleanup man pages exit code descriptions
This commit is contained in:
OpenShift Merge Robot
2020-01-28 03:28:18 -08:00
committed by GitHub
6 changed files with 42 additions and 36 deletions

View File

@ -80,28 +80,28 @@ when creating the container.
The exit code from `podman exec` gives information about why the command within the container failed to run or why it exited. When `podman exec` exits with a The exit code from `podman exec` gives information about why the command within the container failed to run or why it exited. When `podman exec` exits with a
non-zero code, the exit codes follow the `chroot` standard, see below: non-zero code, the exit codes follow the `chroot` standard, see below:
**_125_** if the error is with Podman **_itself_** **125** The error is with Podman itself
$ podman exec --foo ctrID /bin/sh; echo $? $ podman exec --foo ctrID /bin/sh; echo $?
Error: unknown flag: --foo Error: unknown flag: --foo
125 125
**_126_** if the **_contained command_** cannot be invoked **126** The _contained command_ cannot be invoked
$ podman exec ctrID /etc; echo $? $ podman exec ctrID /etc; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error
126 126
**_127_** if the **_contained command_** cannot be found **127** The _contained command_ cannot be found
$ podman exec ctrID foo; echo $? $ podman exec ctrID foo; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error
127 127
**_Exit code_** of **_contained command_** otherwise **Exit code** The _contained command_ exit code
$ podman exec ctrID /bin/sh -c 'exit 3' $ podman exec ctrID /bin/sh -c 'exit 3'; echo $?
# 3 3
## EXAMPLES ## EXAMPLES

View File

@ -65,27 +65,27 @@ The exit code from `podman` gives information about why the container
failed to run or why it exited. When `podman` commands exit with a non-zero code, failed to run or why it exited. When `podman` commands exit with a non-zero code,
the exit codes follow the `chroot` standard, see below: the exit codes follow the `chroot` standard, see below:
**_125_** if the error is with podman **_itself_** **125** The error is with podman itself
$ podman run --foo busybox; echo $? $ podman run --foo busybox; echo $?
Error: unknown flag: --foo Error: unknown flag: --foo
125 125
**_126_** if executing a **_contained command_** and the **_command_** cannot be invoked **126** Executing a _contained command_ and the _command_ cannot be invoked
$ podman run busybox /etc; echo $? $ podman run busybox /etc; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error
126 126
**_127_** if executing a **_contained command_** and the **_command_** cannot be found **127** Executing a _contained command_ and the _command_ cannot be found
$ podman run busybox foo; echo $? $ podman run busybox foo; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error
127 127
**_Exit code_** of **_contained command_** otherwise **Exit code** _contained command_ exit code
$ podman run busybox /bin/sh -c 'exit 3' $ podman run busybox /bin/sh -c 'exit 3'; echo $?
# 3 3
## COMMANDS ## COMMANDS

View File

@ -87,10 +87,13 @@ $ podman rm -f --latest
``` ```
## Exit Status ## Exit Status
**_0_** if all specified containers removed **0** All specified containers removed
**_1_** if one of the specified containers did not exist, and no other failures
**_2_** if one of the specified containers is paused or running **1** One of the specified containers did not exist, and no other failures
**_125_** if the command fails for a reason other than container did not exist or is paused/running
**2** One of the specified containers is paused or running
**125** The command fails for a reason other than container did not exist or is paused/running
## SEE ALSO ## SEE ALSO
podman(1), podman-image-rm(1) podman(1), podman-image-rm(1)

View File

@ -41,10 +41,13 @@ Remove all images and containers.
$ podman rmi -a -f $ podman rmi -a -f
``` ```
## Exit Status ## Exit Status
**_0_** if all specified images removed **0** All specified images removed
**_1_** if one of the specified images did not exist, and no other failures
**_2_** if one of the specified images has child images or is being used by a container **1** One of the specified images did not exist, and no other failures
**_125_** if the command fails for a reason other than an image did not exist or is in use
**2** One of the specified images has child images or is being used by a container
**125** The command fails for a reason other than an image did not exist or is in use
## SEE ALSO ## SEE ALSO
podman(1) podman(1)

View File

@ -1022,25 +1022,25 @@ The exit code from `podman run` gives information about why the container
failed to run or why it exited. When `podman run` exits with a non-zero code, failed to run or why it exited. When `podman run` exits with a non-zero code,
the exit codes follow the `chroot` standard, see below: the exit codes follow the `chroot` standard, see below:
**_125_** if the error is with Podman **_itself_** **125** The error is with Podman itself
$ podman run --foo busybox; echo $? $ podman run --foo busybox; echo $?
Error: unknown flag: --foo Error: unknown flag: --foo
125 125
**_126_** if the **_contained command_** cannot be invoked **126** The _contained command_ cannot be invoked
$ podman run busybox /etc; echo $? $ podman run busybox /etc; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error
126 126
**_127_** if the **_contained command_** cannot be found **127** The _contained command_ cannot be found
$ podman run busybox foo; echo $? $ podman run busybox foo; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error
127 127
**_Exit code_** of **_contained command_** otherwise **Exit code** _contained command_ exit code
$ podman run busybox /bin/sh -c 'exit 3' $ podman run busybox /bin/sh -c 'exit 3'
3 3

View File

@ -126,27 +126,27 @@ The exit code from `podman` gives information about why the container
failed to run or why it exited. When `podman` commands exit with a non-zero code, failed to run or why it exited. When `podman` commands exit with a non-zero code,
the exit codes follow the `chroot` standard, see below: the exit codes follow the `chroot` standard, see below:
**_125_** if the error is with podman **_itself_** **125** The error is with podman **_itself_**
$ podman run --foo busybox; echo $? $ podman run --foo busybox; echo $?
Error: unknown flag: --foo Error: unknown flag: --foo
125 125
**_126_** if executing a **_contained command_** and the **_command_** cannot be invoked **126** Executing a _contained command_ and the _command_ cannot be invoked
$ podman run busybox /etc; echo $? $ podman run busybox /etc; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error
126 126
**_127_** if executing a **_contained command_** and the **_command_** cannot be found **127** Executing a _contained command_ and the _command_ cannot be found
$ podman run busybox foo; echo $? $ podman run busybox foo; echo $?
Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error
127 127
**_Exit code_** of **_contained command_** otherwise **Exit code** _contained command_ exit code
$ podman run busybox /bin/sh -c 'exit 3' $ podman run busybox /bin/sh -c 'exit 3'; echo $?
# 3 3
## COMMANDS ## COMMANDS