:: Re: [DNG] tiny service state api [W…
Forside
Slet denne besked
Besvar denne besked
Skribent: marc
Dato:  
Til: dng@lists.dyne.org
Emne: Re: [DNG] tiny service state api [WAS: Fwd: init system agnosticism]
> > Go on down your path, but I suspect not many people would cheer at you
> > in this camp...
>
> I can see the merit - on two points, technical and political.
>
> > On the technical side, I can see the usefulness of a system
> wide standardised service status reporting - making it easy
> for one process to see if a service it depends on is actually
> running and ready (as opposed to, "has started"). I have a
> customer system I've inherited where it regularly fails to
> startup properly because Asterisk starts before MySQL has
> finished starting up.


So it turns out that there exists an subtle yet elegant mechanism
for a process to report that it is ready. It has been in use
for decades - daemons as old as sysklog from the previous century
use it.

I have written up the details at
http://welz.org.za/notes/on-starting-daemons.html

The TLDR is that "A good daemon should fork soon, but have the
parent process exit only once the child is ready to service requests"

Sadly it seems too subtle for many people and the concept goes
un-noticed ...

regards

marc