Skip to content

blocky exits with status 0 (success) even when it fails at startup #1165

@bjornfor

Description

@bjornfor

I noticed this when the listening port was already taken:

$ blocky --config /path/to/config.yaml
[...]
[2023-09-20 11:55:23]  INFO server: Starting server
[2023-09-20 11:55:23]  INFO server: http server is up and running on addr/port 4000
[2023-09-20 11:55:23] ERROR server start failed: start tcp listener failed: listen tcp :53: bind: address already in use
$ echo $?
0

I think blocky should exit with non-zero status in this case. That should signal the error to systemd, unlike now where systemd thinks the exited blocky process is completely fine/expected.

blocky version: 0.21

EDIT: Pasted wrong log -- this one shows the address already in use error.

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions