Indeed, runit does not run the service as a session leader by default.
runsvdir runs every instance of runsv in a different session, but a
runsv instance runs its service in the same session.
The workaround, as Jonathan pointed out, is to add "setsid"
(or "chpst -P") to your run script, in the command line that execs into
your daemon.
Note that s6 runs the service as a session leader by default,
precisely to avoid that minor annoyance. There is no benefit in running
the supervisor processes in a different session from the scanner
process, but there is benefit in running the services in their own
session.
--
Laurent
Received on Fri Dec 15 2017 - 10:33:16 UTC