First time caller to the show - am I understanding the fifo trick correctly?

From: Ellenor Malik <ellenor_at_umbrellix.net>
Date: Wed, 25 Aug 2021 01:06:14 -0700 (PDT)

Hi supervision_at_!

I realise this is probably more of a skaware_at_ 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
Received on Wed Aug 25 2021 - 10:06:14 CEST

This archive was generated by hypermail 2.4.0 : Wed Aug 25 2021 - 10:06:50 CEST