From 0a39023fd7229371dd3e505208a1c0e073414ac2 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
- Note that there is still a small race condition remaining:
-if the daemon writes a line then instantly dies, and the supervisor
-picks up the death before the s6-notifywhenup
-program picks up the line, it is possible for the event sequence written
-to the fifodir to be wrong - 'd' before 'U'. This should be extremely
-rare, but unfortunately the race condition is unavoidable. The only
-way to be absolutely race-free is to have the daemon perform its
-readiness notification itself, which requires specific support.
+
+ s6 supports that mechanism natively: when the +service directory for the daemon contains +a valid notification-fd file, the daemon's supervisor, i.e. the +s6-supervise program, will properly catch +the daemon's message, update a state file (supervise/ready), then +then notify all the subscribers +with a 'U' event, meaning that the service is now up and ready.
-- cgit v1.2.3