Re: Readiness notification exemplars

From: Laurent Bercot <>
Date: Sat, 04 Apr 2020 15:54:12 +0000

>So the API would be - the thing that starts the daemon opens an fd N,
>the daemon accepts an argument "--ready-fd=N", daemon writes something
>to fd N when ready or just closes it

  Well it has to write something (and in the current version of the
protocol it requires a newline) before closing, else there would be no
telling the difference between readiness and death - which aren't quite
the same thing :) But yes, that's the idea.

  Closing is even optional, but since the supervisor is allowed to stop
reading as soon as it detects a newline, it makes no sense to keep the
fd open after writing the newline.

> and the thing checking whether
>daemon is ready sees fd activity and starts things depending on the

  Yes. In the s6 model, the thing checking that the daemon is ready is
the supervisor, and it reports readiness to anything that has
subscribed (typically the service manager), which can then act

Received on Sat Apr 04 2020 - 15:54:12 UTC

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