-
Notifications
You must be signed in to change notification settings - Fork 3k
podman run: exit status 126/127 seem to be reversed in sense #367
Copy link
Copy link
Closed
Labels
locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.Assist humans wanting to comment on an old issue or PR with locked comments.
Description
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 in cmd/podman/run.go:83-86 is reversed:
# podman run --rm registry.access.redhat.com/rhel7/rhel:latest /etc;echo $?
container create failed: container_linux.go:348: starting container process caused "exec: \"/etc\": permission denied"
: internal libpod error
127
# podman run --rm registry.access.redhat.com/rhel7/rhel:latest nonexistent-command;echo $?
container create failed: container_linux.go:348: starting container process caused "exec: \"nonexistent-command\": executable file not found in $PATH"
: internal libpod error
126
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.Assist humans wanting to comment on an old issue or PR with locked comments.