Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 1997 20:20:30 +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:  <199706022020.UAA10482@veda.is>
In-Reply-To: <Pine.BSF.3.96.970602214748.22454A-100000@lsd.relcom.eu.net> from "[______ ______]" at "Jun 2, 97 09:48:38 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, 2 Jun 1997, Adam David wrote:
> 
> > PIDs gathered from /var/run should always be checked for validity before
> > killing anyway. The old process could have left a stale pidfile without a
> > new process being started. This can happen at any time, not only at reboot.
> 
> It is impossible.
> 
> -- 
> Andrey A. Chernov
> <ache@null.net>
> http://www.nagual.pp.ru/~ache/
> 

That sentence is too terse to make clear sense.

Do you mean that processes don't die and leave pidfiles behind, or that
it is impossible to check whether there is a program running with the same
name and PID as the pidfile claims?

I am witness to the former, and have used the latter with success in the
case of individual programs. It might not be possible to automatically
double-check in a generic context because there is no guaranteed naming
convention. However, given the name of the program and its pidfile, it
is a simple matter to check first, because two different programs cannot
have the same PID at the same time.

If more than one program file creates the same pidfile when it runs, there
is a deeper problem than this, of an administrative nature not programmatical.

--
Adam David <adam@veda.is>




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