supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Ellenor Malik <ellenor@umbrellix.net>
To: supervision@list.skarnet.org
Subject: First time caller to the show - am I understanding the fifo trick correctly?
Date: Wed, 25 Aug 2021 01:06:14 -0700 (PDT)	[thread overview]
Message-ID: <202108250806.17P86E1p031259@invictus.WA.US.Umbrellix.NET> (raw)

Hi supervision@!

I realise this is probably more of a skaware@ question as it makes extensive reference to execline and s6-l-i, but I've been perusing the source code of the latter, hoping that I could learn what "the fifo trick" actually was (I have to admit, I've also been perusing skarnet.org/software) and I think I now get it. In case the fifo doesn't exist, the stage 1 initializer (since I won't be using s6-l-i as I'm not on Linux) has to create the fifo that $LOGGERSERVICE reads (see note [loggerservice-runscript] later in this email), then, let's call that fifo $LOGGERSERVICE/fifo, that initializer has to exec into (execline) redirfd -w -n -b 1 $LOGGERSERVICE/fifo s6-svscan. This is so technically nonsensical that I should probably be barred from ever using a computer again, but please stick with me here. That svscan invocation (or any other service supervisor that doesn't mind SIGPIPE) would then initiate supervision of [loggerservice-runscript] and the knot would be untangled.

[loggerservice-runscript]
#!/package/admin/execline/command/execlineb
/package/admin/execline/command/redirfd -r 0 $LOGGERSERVICE/fifo s6-log n10 s10485760 T !"gzip -nq9" $LOGDIRECTORY/s6-svscan 
# obviously one does not simply use $variables in a runscript - these'd be replaced by the absolute paths at compile time.

Forgiving privilege separation failures and minor grammatical mistakes, does it look as if I understand the fifo trick's application in practice?

Thanks a lot,
--
Ellenor Bjornsdottir (she)
sysadmin umbrellix.net
aspiring OS integrator

             reply	other threads:[~2021-08-25  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  8:06 Ellenor Malik [this message]
     [not found] <202108250806.17P86E1p031259@invictus.wa.us.umbrellix.net>
2021-08-25 11:57 ` Laurent Bercot
2021-08-25 12:19   ` Ellenor Bjornsdottir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108250806.17P86E1p031259@invictus.WA.US.Umbrellix.NET \
    --to=ellenor@umbrellix.net \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).