From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2932 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Serge E. Hallyn" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Readiness notification exemplars Date: Sat, 4 Apr 2020 10:02:09 -0500 Message-ID: <20200404150209.GA564@mail.hallyn.com> References: <20200401142122.GA30742@mail.hallyn.com> <20200401152832.GA31205@mail.hallyn.com> <20200401162600.GA31582@mail.hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="24860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.9.4 (2018-02-28) Cc: Supervision To: Laurent Bercot Original-X-From: supervision-return-2521-gcsg-supervision=m.gmane-mx.org@list.skarnet.org Sat Apr 04 17:02:18 2020 Return-path: Envelope-to: gcsg-supervision@m.gmane-mx.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by ciao.gmane.io with smtp (Exim 4.92) (envelope-from ) id 1jKkJO-0006Nl-NC for gcsg-supervision@m.gmane-mx.org; Sat, 04 Apr 2020 17:02:18 +0200 Original-Received: (qmail 24293 invoked by uid 89); 4 Apr 2020 15:02:41 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 24286 invoked from network); 4 Apr 2020 15:02:41 -0000 Content-Disposition: inline In-Reply-To: Xref: news.gmane.io gmane.comp.sysutils.supervision.general:2932 Archived-At: 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.