This is the mail archive of the 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 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:

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'...


Attachment: pgpW39H14oFUQ.pgp
Description: PGP signature

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