From owner-cvs-etc Mon Jun 2 11:05:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA02659 for cvs-etc-outgoing; Mon, 2 Jun 1997 11:05:03 -0700 (PDT) Received: from spinner.dialix.com.au (spinner.dialix.com.au [192.203.228.67]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA02639; Mon, 2 Jun 1997 11:04:56 -0700 (PDT) Received: from spinner.dialix.com.au (localhost.dialix.com.au [127.0.0.1]) by spinner.dialix.com.au with ESMTP id CAA27545; Tue, 3 Jun 1997 02:03:38 +0800 (WST) Message-Id: <199706021803.CAA27545@spinner.dialix.com.au> X-Mailer: exmh version 2.0gamma 1/27/96 To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: Adam David , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-etc@FreeBSD.ORG Subject: Re: cvs commit: src/etc rc In-reply-to: Your message of "Mon, 02 Jun 1997 21:48:38 +0400." Date: Tue, 03 Jun 1997 02:03:35 +0800 From: Peter Wemm Sender: owner-cvs-etc@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk =?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 > > http://www.nagual.pp.ru/~ache/ Cheers, -Peter