[Date Prev][Date Next]
Re: (ITS#8707) slapd: Add systemd service notification support
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8707) slapd: Add systemd service notification support
- From: email@example.com
- Date: Tue, 12 Sep 2017 20:57:16 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
Ryan Tandy wrote:
> On Tue, Sep 12, 2017 at 08:24:15PM +0000, firstname.lastname@example.org wrote:
>> I don't have documentation for sd_notify() on my machine
>> - what does it return if systemd isn't running at the moment? What does it
>> return if the current program wasn't started by systemd (and thus, the
>> notification is irrelevant)?
> 0 in both of these cases (assuming there is not an unrelated NOTIFY_SOCKET env
> var). However, it also says:
>> In order to support both service managers that implement this scheme and
>> those which do not, it is generally recommended to ignore the return value
>> of this call."
> and the current patch doesn't follow that recommendation, since it does check
> the return value. I don't feel strongly either way about that.
OK. You realize how egregiously gross this kind of API design is? "Oh, yeah,
we return a value, but properly written programs should ignore it."
Everything about this makes me nauseous.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/