Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Feb 2012 14:51:33 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, Guy Helmer <ghelmer@palisadesystems.com>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r230869 - head/usr.sbin/daemon
Message-ID:  <20120205135131.GG30033@garage.freebsd.pl>
In-Reply-To: <4F2E7A3D.8080107@FreeBSD.org>
References:  <201202011641.q11Gf0j6095461@svn.freebsd.org> <20120204074201.GA1694@garage.freebsd.pl> <74AF334B-CD90-4A43-96C4-1CF69C8EA42B@palisadesystems.com> <20120205095922.GD30033@garage.freebsd.pl> <4F2E7A3D.8080107@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--m972NQjnE83KvVa/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Feb 05, 2012 at 04:46:53AM -0800, Doug Barton wrote:
> On 02/05/2012 01:59, Pawel Jakub Dawidek wrote:
>=20
> > I seem to miss positives of the other approach. Leaving stale PIDs in
> > pidfile is something we should avoid at all costs, so recommending that
> > in the manual page is not the best recommendation.=20
>=20
> Which is worse ... potentially stale pidfiles that get cleaned up at
> every boot, or stale directories that never do?

Every boot might be very rare situation on servers. Those directories
should be cleaned when application is deinstalled and not when process
exits.

> I'm also not sure why you think this method will leave behind a stale
> pidfile. The idea is that the pidfile is pre-created with the ownership
> that daemon is going to su to, for the express purpose of allowing it to
> delete the pidfile when the process exits. If you're saying that this
> method doesn't work then please point out the problem ASAP because
> numerous ports rc.d scripts do this now.

Great, but this is not how UNIX permissions work. To remove directory
entry you have to have rights to modify the directory. Having write
permission to file within the directory won't allow you to remove it.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

--m972NQjnE83KvVa/
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk8uiWMACgkQForvXbEpPzTwVACfTREBUze/Wxv98p0JKuqZ6kQE
RLgAnjQWJISuF1L4C5y97X/keDPGi+eX
=ufav
-----END PGP SIGNATURE-----

--m972NQjnE83KvVa/--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120205135131.GG30033>