Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 1997 22:27:07 +0000 (GMT)
From:      Adam David <adam@veda.is>
To:        ache@nagual.pp.ru (=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?=)
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-etc@FreeBSD.ORG
Subject:   Re: cvs commit: src/etc rc
Message-ID:  <199706022227.WAA10666@veda.is>
In-Reply-To: <Pine.BSF.3.96.970603003713.24648A-100000@lsd.relcom.eu.net> from "[______ ______]" at "Jun 3, 97 00:42:00 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > IMHO, if the program wipes its name out altogether it deserves whatever crap
> > it gets.
> 
> Program name not related to its pid file, you try to introduce unnecesarry
> restriction.

I already stated that it is necessary to know both names in order to check.
It is only when the program clobbers itself that it gets into trouble. If
a program is so paranoid as to erase its tracks entirely, it has no business
maintaining pidfiles.

> If program not test pid file via flock(), it deserves ...  I.e. all
> programs except gated and few others got what they want.  So, they require
> modifications to check locking, so it is impossible to validate pid files
> without applications modifications (as I already say in previous letter). 

#!/bin/sh
kill `cat /var/run/progname.pid`

(yes, there are programs that make the assumption that pidfiles exist for
the duration of a programs execution, and not a moment longer).

Most of the time when the program has expired, it will produce an unexpected
and often confusing error, but occasionally it hits the wrong program
altogether. Even once is too often. It is not the offender that suffers
but an innocent bystander. (randomly directed violence)

I have also seen stale locks, but not on a healthy system.
(file claims to be locked, but no process holds the lock).
 
> Modification of each such application is not acceptable solution.

Each such application already uses its own methods, which are demonstrably
deficient in many cases.

--
Adam David <adam@veda.is>



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