The s6-rc-fdholder-filler internal program
s6-rc-fdholder-filler creates anonymous pipes and stores them into a
s6-rc-fdholder-filler is not meant to be used directly; it is used
in internal scripts created by
s6-rc-compile, which are invoked during an
s6-rc-fdholder-filler [ -1 ] [ -t timeout ] < longrunnamesfile
- s6-rc-fdholder-filler expects file descriptor 6 to be open and
connected to the
daemon instance managed by s6-rc as the internal s6rc-fdholder service.
- It reads a list of longrun names from its stdin, one per line.
Empty lines are ignored; comments starting with # are ignored;
leading whitespace is ignored, but trailing whitespace is not.
- For every name longrun that it finds, it
creates an anonymous pipe, and stores both ends of that pipe into the
instance, with the pipe:s6-rc-r-longrun (for the reading
end) and pipe:s6-rc-w-longrun (for the writing end)
identifiers, and an infinite timeout.
- It then exits 0.
- -1 : write a newline to stdout before exiting after
successful operation. This is used as a notification mechanism.
- -t timeout : if the operation cannot be
achieved in timeout milliseconds, abort and report failure. By
default, timeout is 0, meaning infinite.
- 0: success
- 100: wrong usage
- 111: system call failed
- s6-rc-fdholder-filler is never meant to be used manually; this page
should only be used to understand s6-rc internals.
- s6-rc-fdholder-filler is used in the s6rc-fdholder internal
service's run script, right after the
daemon is started; its arguments are the names of all the consumer longrun
services declared in the service database.
- The point is to create all the pipes for the longrun pipelines in
advance, every time the s6rc-fdholder service is started, and
make them available in the fd holder. This way, pipelined services
can simply retrieve their stdin (for consumers) or stdout (for producers)
from the fd holder, at any time: even if a pipeline service dies and is
restarted, the pipe will remain valid.
- If the fd holder itself dies, it will be refilled with a new set
of pipes as soon as it is restarted. Pipelined services will not be
impacted until one of them restarts; then all the pipeline will