prepare-svscan does generic preparation of the supervision tree. It is also used in system-init and user-init.
prepare-svscan workingdir rundir bundle prog...
/dev/null.
0022.
rundir.
workingdir/run-image/.
to rundir/.
rundir/service/s6-svscan-log/fifo.
rundir/service/s6-svscan-log/fifo.
rundir/s6-rc does not exist,
rundir/service using
s6-rc-init
and starts the bundle bundle using s6-rc.
workingdir/env is sourced using
s6-env.
prog...,
which is usually directly or indirectly
s6-svscan.
Once s6-svscan is launched it will start an
s6-supervise
process on rundir/service/s6-svscan-log which starts
s6-log reading
from rundir/service/s6-svscan-log/fifo.
This in turn triggers the forked background process to continue with its second step.