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 via email to