>But then, there is a problem if one actually wants the server address
>information that --print-address provides. Alexis' 'run' script for
>example wants to save that to a file (apparently in a directory
>suitable for s6-envdir). If the output is sent to the notification
>pipe instead, s6-supervise will 'eat' it while waiting for the final
>newline character, and then the information is lost.
That is true. The option is only usable as readiness notification if
you
don't otherwise need the information.
>And more generally, there's also the question about how 'ready'
>dbus-daemon actually is when the point in its code that prints the
>server address is reached. I can't really say without looking at the
>code; dbus-daemon has many duties once its UNIX domain socket is
>bound.
That doesn't matter. The important thing with readiness is that clients
need to be able to send messages to the daemon. As soon as the socket is
bound, it's okay; if the daemon hasn't finished initializing yet, then
that's what kernel socket buffers are for.
Of course, if the daemon still needs to allocate resources and can
*fail*
after binding the socket and printing the line, that's not good, but
well,
it's a balance between reliability and simplicity.
--
Laurent
Received on Sat Apr 06 2024 - 15:57:23 CEST