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.