Date: Tue, 03 Jun 1997 02:03:35 +0800 From: Peter Wemm <peter@spinner.dialix.com.au> To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru> Cc: Adam David <adam@veda.is>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-etc@FreeBSD.ORG Subject: Re: cvs commit: src/etc rc Message-ID: <199706021803.CAA27545@spinner.dialix.com.au> In-Reply-To: Your message of "Mon, 02 Jun 1997 21:48:38 %2B0400." <Pine.BSF.3.96.970602214748.22454A-100000@lsd.relcom.eu.net>
next in thread | previous in thread | raw e-mail | index | archive | help
=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= wrote: > 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. Well, not quite "impossible", but it's not exactly simple for scripts to deal with.. Gated uses a flock() lock on it's pid file as the "lock", the existance of the file does not imply that it's valid. So, things like gdc etc try and do a conflicting lock request which should succeed if gated is not runni ng, and should fail if it is there. But doing this for other daemons requires code changes in each one. The problem with gated in particular was that if it was started with the network code, ie: before NFS mounts, it would put it's pid file in /var/ run. However, after the NFS mounts took place, /var/run used to be cleared.. (in case /var was nfs mounted I guess). So, gdc was not able to talk to the running gated. Anyway, for innd, I always put the pid file in the newslib dir, right next to the active file since it was important to innd that it not "go away" on boot. > -- > Andrey A. Chernov > <ache@null.net> > http://www.nagual.pp.ru/~ache/ Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706021803.CAA27545>