Compare commits

..
1 Commits
Author SHA1 Message Date
sneak ce741c2e11 README and SPEC say what docker stop does to requests in progress when the app exits at once (closes #139)
check / check (push) Canceled after 0s
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
2026-10-20 12:34:08 +00:00
2 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -1958,9 +1958,10 @@ main "$@"
`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 finish
its requests in progress keeps answering them for up to five seconds after
SIGTERM.
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.
+4 -2
View File
@@ -1330,8 +1330,10 @@ The two processes:
writes its state files as it stops (see "Persistent state"). The requests in
progress can finish 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 finish its requests in
progress keeps answering them for up to five seconds after SIGTERM.
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.
- The container's root filesystem stays writable: runit writes each service's
status into its directory under `/etc/service`.