Re: Readiness notification exemplars

From: Serge E. Hallyn <serge_at_hallyn.com>
Date: Sat, 4 Apr 2020 10:02:09 -0500

On Wed, Apr 01, 2020 at 05:13:06PM +0000, Laurent Bercot wrote:
>
> > There are pros and cons, but you are arguing for parsing stdout for a
> > text message and/or using pidfiles (written to an fd).
>
> I'm arguing for none of these things.
> I'm arguing for daemons to write a newline to a fd of their choice,
> which is hardly anything difficult. And hardly anything difficult for
> a supervisor to implement (if you're going to say that it's "parsing

Sorry, the week got away from me and I never replied.

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, and the thing checking whether
daemon is ready sees fd activity and starts things depending on the
daemon?

It does sound good.
Received on Sat Apr 04 2020 - 15:02:09 UTC

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