svn commit: r230869 - head/usr.sbin/daemon

Pawel Jakub Dawidek pjd at FreeBSD.org
Sat Feb 4 07:43:19 UTC 2012


On Wed, Feb 01, 2012 at 04:41:00PM +0000, Guy Helmer wrote:
> Author: ghelmer
> Date: Wed Feb  1 16:40:59 2012
> New Revision: 230869
> URL: http://svn.freebsd.org/changeset/base/230869
> 
> Log:
>   Change the notes about the pidfile to include Doug's preference
>   for pre-creating the pidfile with appropriate owner and permissions.
>   
>   Requested by dougb

Pre-creating pidfiles? That sounds weird. The common practise is to turn
eg. /var/run/<name>.pid into /var/run/<name>/pid where <name> directory
has appropriate permissions. Pre-creating pidfiles is simply wrong,
because applications create pidfile on start and unlink it on exit.
If application has no permission to remove files from /var/run/ it will
leave pidfile with stale PID in it, which is bad. Changing application
to truncate pidfile on exit instead of unlinking it also is a bad idea
especially because there is working solution - pid directory.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120204/60e61f9a/attachment.pgp


More information about the svn-src-all mailing list