Skip to content

podman run: exit status 126/127 seem to be reversed in sense #367

@edsantiago

Description

@edsantiago

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

Metadata

Metadata

Assignees

Labels

locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions