Skip to content

Conversation

@Maks1mS
Copy link

@Maks1mS Maks1mS commented Dec 21, 2025

The supervisorctl status command may return status 3, which causes the process to terminate prematurely due to set -e (228558f).

weblate@05c0208c750d:/$ services="$(/app/venv/bin/supervisorctl status)"
weblate@05c0208c750d:/$ echo $?
3
weblate@05c0208c750d:/$ echo $services
celery RUNNING pid 337, uptime 0:13:17 celery-beat RUNNING pid 338, uptime 0:13:17 check EXITED Dec 21 10:22 AM granian RUNNING pid 335, uptime 0:13:17 nginx RUNNING pid 336, uptime 0:13:17
$ sh -c 'echo start; f() { return 3; }; f; echo end;'
start
end
$ sh -c 'set -e; echo start; f() { return 3; }; f; echo end;'
start

Possible fix:

weblate@05c0208c750d:/$ services="$(/app/venv/bin/supervisorctl status || true)"
weblate@05c0208c750d:/$ echo $?
0
weblate@05c0208c750d:/$ echo $services
celery RUNNING pid 337, uptime 0:14:00 celery-beat RUNNING pid 338, uptime 0:14:00 check EXITED Dec 21 10:22 AM granian RUNNING pid 335, uptime 0:14:00 nginx RUNNING pid 336, uptime 0:14:00

The `supervisorctl status` command may return status 3, which causes the process to terminate prematurely due to `set -e`.
@nijel
Copy link
Member

nijel commented Dec 21, 2025

This was introduced because supervisorctl was broken. By ignoring the exit status completely it will again be unnoticed

nijel added a commit to nijel/docker that referenced this pull request Dec 21, 2025
The supervisorctl status is actually exit with 3, so handle this
gracefully.

Fixes WeblateOrg#3997
Replaces WeblateOrg#3996
@nijel
Copy link
Member

nijel commented Dec 21, 2025

#3999 should be a better approach; review is welcome!

@nijel nijel closed this Dec 21, 2025
nijel added a commit that referenced this pull request Dec 21, 2025
The supervisorctl status is actually exit with 3, so handle this
gracefully.

Fixes #3997
Replaces #3996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants