1 Commits
Author SHA1 Message Date
sneak 92ffc37681 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 11:51:29 +00:00
2 changed files with 5 additions and 8 deletions
+3 -4
View File
@@ -1958,10 +1958,9 @@ main "$@"
`smallwebwaf` then stops taking requests and gives those in progress five `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 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 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 cut short if the app had already begun to answer. An app that should finish
finish keeps taking and answering requests, not only the ones it already has, its requests in progress keeps answering them for up to five seconds after
for the whole five seconds after SIGTERM, since `smallwebwaf` can still pass SIGTERM.
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 rule file is one rule per line: a name, what to match against, what to do, and
a regex. a regex.
+2 -4
View File
@@ -1330,10 +1330,8 @@ The two processes:
writes its state files as it stops (see "Persistent state"). The requests in 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 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 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 the app had already begun to answer. An app that should finish its requests in
taking and answering requests, not only the ones it already has, for the whole progress keeps answering them for up to five seconds after SIGTERM.
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 - The container's root filesystem stays writable: runit writes each service's
status into its directory under `/etc/service`. status into its directory under `/etc/service`.