:: Re: [Dng] Readiness notification (w…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tomasz Torcz
Fecha:  
A: dng
Asunto: Re: [Dng] Readiness notification (was: One issue with ongoing depoetterization)
On Fri, Jun 12, 2015 at 07:37:21PM +0200, Laurent Bercot wrote:
> On 12/06/2015 19:01, Steve Litt wrote:
> >The one thing I *do* know is that we need to provide a sd_notify
> >interface, even if it does nothing at all and drops passed information
> >on the floor.
>
>
>  There's a much simpler mechanism that can be used to provide
> readiness notification, and that I suggest in
>    http://skarnet.org/software/s6/notifywhenup.html
> and that is: write a given character on a descriptor, then close that
> descriptor.


Hey, it's almost exactly what sd_notify() does. Instead of one character,
it writes "READY=1" to a socket. Nothing more, no D-Bus, no additional
libraries needed. In basic form it few lines of C code.
Of course https://github.com/systemd/systemd/blob/0e4061c4d5de6b41326740ee8f8f13c168eea28d/src/libsystemd-daemon/sd-daemon.c#L414
looks much worse, but it packs more functionality than simply
readiness signalling.


-- 
Tomasz Torcz               RIP is irrevelant. Spoofing is futile.
xmpp: zdzichubg@???     Your routes will be aggreggated. -- Alex Yuriev