README and SPEC say what docker stop does to requests in progress when the app exits at once (closes #139)
check / check (push) Waiting to run

runit stops smallwebwaf and the app at the same time, so the five seconds
smallwebwaf gives requests in progress help only while the app still
answers them. Both documents now say so, say what the client gets when the
app exits at once on SIGTERM, and say what an app does to let its requests
in progress finish.

Model: opus-5-5
This commit was merged in pull request #146.
This commit is contained in:
2026-10-20 15:28:31 +02:00
parent d9f7344ae6
commit b0d54a2c51
2 changed files with 18 additions and 5 deletions
+8 -2
View File
@@ -1954,8 +1954,14 @@ main "$@"
without one, it still starts. At each start the `run` script of `smallwebwaf`
gives that directory and every file in it to the `smallwebwaf` user, so a host
directory mounted there needs no change of owner.
- `docker stop` has runit stop both processes. `smallwebwaf` then stops taking
requests and gives those in progress five seconds to finish.
- `docker stop` has runit stop both processes at once, each with SIGTERM.
`smallwebwaf` then stops taking requests and gives those in progress five
seconds to finish, which they can do only while the app still answers. An app
that exits at once on SIGTERM ends them: the client gets `502`, or a response
cut short if the app had already begun to answer. An app that should let them
finish keeps taking and answering requests, not only the ones it already has,
for the whole five seconds after SIGTERM, since `smallwebwaf` can still pass
it requests it took before then.
A rule file is one rule per line: a name, what to match against, what to do, and
a regex.