On Thu, Feb 24, 2022 at 12:26:51PM +0100, Lorenzo wrote: > > However, if there were a natural-language explanation or flowchart, I > > think I could summarize it succinctly in a manner appropriate for the > > man page, within a day. > > > > Alas, that's all the help I can offer at the moment. > > > > András > > > > an attempt to fully explain the actual behavior is ( only for d, the > same goes for x)
So I suggest the following: --- 8< --- CUSTOMIZE 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. Specifically: If the service is running or paused, control characters "d" and "x" are handled as follows: 1. runsv checks whether control/t exists and is executable and runs it if yes. 2. If 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 control/c even if it exists and is executable. 4. Runsv checks whether 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. --- >8 --- I believe this is clear; I don't know if it's accurate. András -- Depression is merely anger without enthusiasm.