-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman run: exit status 126/127 seem to be reversed in sense #367
Comments
This sounds like https://github.com/projectatomic/libpod/blob/5529143877778ef8bcdd05179e279bb7d662b431/cmd/podman/run.go#L81-L87 Either the error codes are switched in the code or in the manpages. We should fix whichever breaks with Docker convention. |
My bad: I meant to include this: docker is the opposite. That is: I believe the podman documentation should remain as-is, and the code itself should be adjusted. As long as I'm blabbing, though: I'm not sure if grepping for "permission denied" is the best way to implement this. There may be other reasons why a command cannot be invoked. I can't think of any offhand, though, and don't have a better suggestion atm. |
I tend to agree that manually manipulating the error seems like a bad idea. It might be a good idea to expose more explicit error codes of of libpod so we have a better idea of what's going on |
I'm also far from certain ctr.Init() erroring means the command did not exist, given that Init failure could also be issues with storage and mounts. |
The convention that is followed in the chroot command.
|
Permission denied should be 126 SO they are reversed. |
The exit codes for 126 and 127 were reversed. For the record, the exit codes used are as follows: * 125 if ‘chroot’ itself fails * 126 if COMMAND is found but cannot be invoked * 127 if COMMAND cannot be found This resolves issue containers#367 Signed-off-by: baude <[email protected]>
The exit codes for 126 and 127 were reversed. For the record, the exit codes used are as follows: * 125 if ‘chroot’ itself fails * 126 if COMMAND is found but cannot be invoked * 127 if COMMAND cannot be found This resolves issue #367 Signed-off-by: baude <[email protected]> Closes: #378 Approved by: baude
Fixed! |
podman-run(1)
asserts that it will exit with 126 if command cannot be invoked (e.g. permission denied), and 127 if the command cannot be found. I believe the test sense incmd/podman/run.go:83-86
is reversed:The text was updated successfully, but these errors were encountered: