Skip to content

Improper exit code #60

Open
Open
@maticmeznar

Description

@maticmeznar

When I stop docker_auth with Ctrl+C (SIGINT) or SIGTERM, it exits with exit code 1. When docker_auth fails to start due to being unable to read the config file, it also exits with code 1.

POSIX convention says exit code 0 indicates success - no error. Exit codes other than 0 indicate failures. docker_auth can be fixed by exiting with code 0 on a clean exit.

$ docker run --name docker-reg-auth --user=nobody --cap-drop=ALL -v /data/config/dr_auth:/config:ro -v /data/certs:/certs:ro docker.io/cesanta/docker_auth --v=2 --alsologtostderr /config/auth_config.yml
... Ctrl+C...
$ echo $?
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions