This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] Mark nscd service as forking in systemd service file (#16639)


On Wed, Feb 26, 2014 at 02:47:03PM -0800, Russ Allbery wrote:
> The best fix from a systemd perspective is to not use either of these
> service types and instead use Type=notify along with the sd_notify(3) API
> to clearly inform systemd when the daemon is actually ready to answer
> requests.  This would produce the correct behavior in this case without
> requiring reverting the service type to the forking model.  This is
> exactly the problem for which the sd_notify(3) interface was created.

This is rather hideous to ask daemons to link to some systemd library
and make a special function call to perform the notification. The
obvious correct way to do the notification is to have the daemon
inherit a file descriptor to a pipe, and write to and close it once
initialization is complete. (Contents written would not matter; the
idea is that an empty pipe, the default case on unexpected exit/close,
would indicate failure.)

Leave it to systemd to design something idiotically complicated that
forces everybody to link to their libs...

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]