Re: s6 style "readiness notification" with perpd

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Fri, 26 Apr 2019 15:28:30 +0000

>how is that ?
>what if 2 services (non-interdependent, to be started concurrently)
>specify/use the same fd (number) to write their readiness notification
>message to ? how could perpd tell which of the 2 nofied it ?

  It doesn't matter what the number is that the service sees. As long
as perpd creates a separate pipe for every service (which is why it
would count against the maximum number of services it can maintain),
it can read the notifications from every service separately.

  The notification-fd value used by s6-supervise is not relevant to
s6-supervise, it's only relevant to the service. It's only used
by s6-supervise at ./run spawning time, to tell what number the
*child* should dup2() the notification pipe to before execing ./run,
so the pipe is made available to the service on the fd it expects.
The supervisor itself does not use fixed fd numbers. It would be
the same with perpd.

--
  Laurent
Received on Fri Apr 26 2019 - 15:28:30 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC