[PATCH 4/4] Mark nscd service as forking in systemd service file (#16639)
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Feb 26 18:54:00 GMT 2014
On Wed, Feb 26, 2014 at 01:39:50PM -0500, Rich Felker wrote:
> On Wed, Feb 26, 2014 at 10:52:42PM +0530, Siddhesh Poyarekar wrote:
> > Hi,
> >
> > Currently the nscd service is installed in systemd as a simple
> > service, which means that it is able to handle its own errors and does
> > not quit. Since nscd does not fit that description, i.e. it can exit
> > on errors like, say, failing to parse nscd.conf, it should be declared
> > as forking instead. Tested on Fedora.
>
> I don't think this is the right meaning of "forking". Forking just
> means the daemon backgrounds itself so that its parent cannot manage
> its lifetime with a pid. If this behavior cannot currently be fixed in
> nscd via a command line option, it should be fixed at the source
> level. Forking is always wrong for daemons.
That's the meaning I got from a systemd maintainer, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1048123#c2
Fixing nscd to be a well-behaved daemon that recovers from its errors
is a fairly complicated task, given the number of errors it would need
to recover from. I think it is a good compromise to start with and
maybe keep a bug open to track nscd's error recovery.
>
> > [Service]
> > -Type=simple
> > -ExecStart=/usr/sbin/nscd --foreground
> > +Type=forking
> > +ExecStart=/usr/sbin/nscd
>
> It looks like the --foreground option is correct and this patch breaks
> something that was working before.
>
> > ExecStop=/usr/sbin/nscd --shutdown
> > ExecReload=/usr/sbin/nscd -i passwd
> > ExecReload=/usr/sbin/nscd -i group
>
> These look incorrect though.
I guess you're right, since reloading configuration and invalidating
cache are two completely different ideas. Unless, the interpretation
of the original author was to 'reload the cache'...
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140226/d20d34c5/attachment.sig>
More information about the Libc-alpha
mailing list