summaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-11 17:26:35 -0400
committerGitHub <noreply@github.com>2021-09-11 17:26:35 -0400
commitec3037062d1f9a5ece00ffd465c0f815c06f1b5c (patch)
tree54ecc133a0103d19084ed4ac99f7b57aebd97d4a /docs/source
parent0501258b735684948e32019c0499030309349fc9 (diff)
parentd2e10a71d69565929309ff3c32665b216698d8b1 (diff)
downloadpodman-ec3037062d1f9a5ece00ffd465c0f815c06f1b5c.tar.gz
podman-ec3037062d1f9a5ece00ffd465c0f815c06f1b5c.tar.bz2
podman-ec3037062d1f9a5ece00ffd465c0f815c06f1b5c.zip
Merge pull request #11513 from Luap99/unshare
podman unshare keep exit code
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/markdown/podman-unshare.1.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-unshare.1.md b/docs/source/markdown/podman-unshare.1.md
index 2e7adfd34..72821b6e5 100644
--- a/docs/source/markdown/podman-unshare.1.md
+++ b/docs/source/markdown/podman-unshare.1.md
@@ -37,6 +37,35 @@ connect to a rootless container via IP address (CNI networking). This is otherwi
not possible from the host network namespace.
_Note: Using this option with more than one unshare session can have unexpected results._
+## Exit Codes
+
+The exit code from `podman unshare` gives information about why the container
+failed to run or why it exited. When `podman unshare` commands exit with a non-zero code,
+the exit codes follow the `chroot` standard, see below:
+
+ **125** The error is with podman **_itself_**
+
+ $ podman unshare --foo; echo $?
+ Error: unknown flag: --foo
+ 125
+
+ **126** Executing a _contained command_ and the _command_ cannot be invoked
+
+ $ podman unshare /etc; echo $?
+ Error: fork/exec /etc: permission denied
+ 126
+
+ **127** Executing a _contained command_ and the _command_ cannot be found
+
+ $ podman run busybox foo; echo $?
+ Error: fork/exec /usr/bin/bogus: no such file or directory
+ 127
+
+ **Exit code** _contained command_ exit code
+
+ $ podman run busybox /bin/sh -c 'exit 3'; echo $?
+ 3
+
## EXAMPLE
```