supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runit: runsv(8) incorrect regarding control/[dx]
@ 2022-02-15  1:26 Lorenzo
  0 siblings, 0 replies; only message in thread
From: Lorenzo @ 2022-02-15  1:26 UTC (permalink / raw)
  To: supervision

Hi all,

I'm maintaining runit in Debian and I have a bug report [1] on the
customized control of runsv.
The standard behavior appears to be that first, files in
service/control/ are checked and then, only if they don't exists or
return nonzero runsv proceeds to send the appropriate signal.
However with control/[dx] the manpage gets more confused and it's not
obvious that the code actually does [2]

  * check for control/t , possibly overriding SIGTERM
  * SIGTERM (not if control/t returned zero)
  * SIGCONT (control/c is disregarded)
  * check and run control/[dx]
    (does the return code of [dx] have any effect here?)

The reporter asks to change the code so that it behave consistently
with the standard mechanism, it could look something like

  * check and run control/[dx] , possibly overriding SIGTERM
  * check for control/t , possibly overriding SIGTERM (not if
    control/[dx] returned zero)
  * SIGTERM (not if control/[dxt] returned zero)

I can't think of a reasonable use case for [B], except that is
possible to have a different override for SIGTERM with t and dx
commands.. not even sure is a good thing to have this inconsistent
On the other hand I'm not sure of what was the intended use for [dx]
in [A]: d or x scripts are like a "special finish file" that is run
before the actual finish file, but only when the requested status of
the service is WANT_DOWN or WANT_EXIT, with the return code that has no
effect? ..

Any example/opinion on why [A] is better than [B] or vice versa?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-15  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  1:26 runit: runsv(8) incorrect regarding control/[dx] Lorenzo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).