On Tue, 08 Aug 2017 04:23:27 +0900, Ryan Tandy wrote:
- rc = sd_notifyf( 1,
"READY=1\n"
"STATUS=slapd: ready to serve connections...\n"
"MAINPID=%lu",
(unsigned long) getpid() );
I see you've placed this call later than the parent's exit point. Any comments about the timing of this relative to the parent's exit, and to the listener startup and so on? Are the listeners more likely to be ready to serve connections at this point? I seem to recall that in the past there was opposition to moving the parent's exit later, but I can't remember why. (and I still wish we could do that, and dispense with the ldapsearch-loop hacks...)
I've revised the patch for master to check if the listener initialization suceeds or not. With this patch, `slapd -d0` can return non-zero exit code if the listener initialization fails, thus systemd can detect slapd.service startup failure.
* https://github.com/osstech-jp/openldap/pull/4 * https://patch-diff.githubusercontent.com/raw/osstech-jp/openldap/pull/4.patc...