On 6/13/2015 11:48 AM, Laurent Bercot wrote:
It's
a wrapper for daemons using the simple "write a newline" readiness
notification mechanism advertised by s6, which converts that
notification to the sd_notify format.
This had me tossing around some ideas yesterday while I was headed home.
Most (but not all) daemons provide logging.
Logging generally (but not always) implies calling printf() with a
newline at some point.
What if we could come up with a simple standard that extends your
newline concept into the logging output? A newline itself may be
emitted as part of a startup string sent to a log, so I can't be assured
that a daemon is really ready. But what if we could ensure that a
universally agreed pattern were present in the log? Something like
"Ready.\n" when the daemon is up. We literally could watch the
stdout/stderr for this pattern and would solve the entire "readiness
notification" problem in one go.
It would be an enormous problem politically because most daemon authors
aren't going to add the 3-4 lines of code needed to support this.
But I could dream...