From 30281ba43b3d843cc02113f84602c09fe0702674 Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Wed, 28 Aug 2024 15:09:50 +0800 Subject: add/update doc & man page of chpst and runsv 1. fix error in runsv for log/finish: Log ./finish script is not actually invoked. It is not clear, whether this limitation is worth lifting. 2. add options -t and -V to chpst man page; ignore -r since it's obsolete. 3. clarify in runsv.8 manpage how signal override works with control/dx copied from debian's patch: 0009-fix-error-in-manpage.patch 0027-Clarify-runsv-8-control-dx.patch 0027-Add-missing-options-to-chpst-manpage.patch links of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches --- doc/runsv.8.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'doc/runsv.8.html') diff --git a/doc/runsv.8.html b/doc/runsv.8.html index d27deeb..04f299e 100644 --- a/doc/runsv.8.html +++ b/doc/runsv.8.html @@ -115,15 +115,29 @@ to send a TERM signal to the socklog-unix service, either do # sv term printf(1) usually blocks if no runsv process is running in the service directory.

Customize Control

-For each control character c sent to the control +For each control character c except "d" and "x" sent to the control pipe, runsv first checks if service/control/c exists and is executable. If so, it starts service/control/c and waits for it to terminate, before interpreting the command. If the program exits with return code 0, runsv refrains from sending the service the corresponding signal. The command o is always considered as command u. On command d first service/control/t is checked, and then service/control/d. On command x first service/control/t -is checked, and then service/control/x. The control of the optional log -service cannot be customized. +is checked, and then service/control/x. Specifically:
+

+

1.
+
runsv checks whether service/control/t exists and is executable and runs it if yes.
+ +
2.
+
If service/control/t exits nonzero, or is not executable or doesn't exist, runsv sends + the service a TERM signal.
+ +
3.
+
runsv sends the service a CONT signal, disregarding service/control/c even if it exists and is executable.
+ +
4.
+
runsv checks whether service/control/d (or control/x) exists and is executable and runs it if yes. Its exit status is ignored.
+

+The control of the optional log service cannot be customized.

Signals

If runsv receives a TERM signal, it acts as if the character x was written to the control pipe. -- cgit 1.4.1