supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* First time caller to the show - am I understanding the fifo trick correctly?
@ 2021-08-25  8:06 Ellenor Malik
  0 siblings, 0 replies; 3+ messages in thread
From: Ellenor Malik @ 2021-08-25  8:06 UTC (permalink / raw)
  To: supervision

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <202108250806.17P86E1p031259@invictus.wa.us.umbrellix.net>]

end of thread, other threads:[~2021-08-25 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  8:06 First time caller to the show - am I understanding the fifo trick correctly? Ellenor Malik
     [not found] <202108250806.17P86E1p031259@invictus.wa.us.umbrellix.net>
2021-08-25 11:57 ` Laurent Bercot
2021-08-25 12:19   ` Ellenor Bjornsdottir

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