By the way, is the blocking behavior of fifos part of POSIX ?
----- Mail original -----
> De: "Laurent Bercot" <ska-skaware_at_skarnet.org>
> À: skaware_at_list.skarnet.org
> Envoyé: Vendredi 27 Janvier 2017 15:32:09
> Objet: Re: s6-rc:
>
> Yes, that should work, and yes, that's dirty, but you can't really do
> any better. s6-rc(-init) assumes that an instance of s6-svscan is
> already running on a scandir, and s6-svscan does not send any
> readiness
> notification, so there will be a small race indeed, unless you use
> such a pipe trick.
> Adding readiness notification would be more bloat than it's worth,
> since having to synchronize between s6-svscan and s6-rc-init only
> happens
> once.
>
> The stage 1 script created by s6-linux-init-maker does something
> comparable to your pipe trick, but it uses the fifo that s6-svscan's
> logger reads from. When that fifo unblocks, not only is s6-svscan
> already running, but it's also in its main loop and has already
> created
> at least one service (its own logger), so it's a better readiness
> guarantee.
>
Received on Sat Jan 28 2017 - 10:16:22 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:38:49 UTC