Thanks a lot of the help Colin.
> For s6, terminate should run s6-svscanctl -t $supervise. -7 is mostly
> used to shut down the host when s6 is being run as an init.
>
Awesome, will implement right way.
>
> Reading the man page for runsvdir, if you send runsvdir SIGHUP it'll
> TERM all its attendant runsv processes and then quit. Sending SIGTERM
> to runsv causes it to TERM all children, and close stdin on all
> loggers which (assuming the logger is well behaved) will shut it down
> as well. There isn't a helpful interface into runsvdir like there is
> with s6-svscan or perpd, but assuming you can figure out a half decent
> way to get a signal to the correct runsvdir, you can add terminate
> handling for runit.
>
It definitely works, and I'm sure I can find a way to get the correct
runsvdir pid.
> Terminate for daemontools is a bit more complicated since svscan
> doesn't directly support shutting down its supervisors when it dies.
> Assuming you can safely get the correct pid for svscan the following
> works:
> kill $svscan-pid
> svc -dx $supervise/*/log $supervise/*
>
> It's race-prone since something might resurrect svscan before the svc
> takes effect. This isn't a huge deal since supervise (and runsv, and
> s6-supervise) exit immeidately if they are run against an already
> supervised directory but it'll be noisy for a bit while your old
> supervisors finish cleaning up.
>
It's definitely not ideal, but I'll take a look into it. Just to be clear,
"kill $svscan-pid", that will be a TERM signal, right?
Thanks again,
Ido.
Received on Thu Aug 06 2015 - 17:25:16 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:44:19 UTC