Re: svsh 1.0.0 released

From: Colin Booth <>
Date: Thu, 6 Aug 2015 08:12:48 -0700

On Wed, Aug 5, 2015 at 1:08 AM, Ido Perlmuter <> wrote:
> Hi everyone!
> I've released the first version of the shell I was working on. I put up a
> simple website for it in There's some
> screenshots there to give you an idea of how it looks, and explanations of
> what you can do with it. This version supports runit, daemontools, s6 and
> perp.
> Supported commands:
> * status - get a list of services, their statuses, uptimes/downtimes, pids
> * start - start a list of services
> * stop - stop a list of services (do not start again)
> * restart - restart a list of services
> * signal - send a unix signal to services
> * fg - move service to the foreground
> * rescan - trigger base directory rescan (s6 and perp only)
> * terminate - terminate the supervisor and all services (s6 and perp only)
> Thanks,
> Ido Perlmuter.


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.

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.

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
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.


"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Thu Aug 06 2015 - 15:12:48 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC