From owner-freebsd-current Tue Jul 4 07:37:54 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id HAA26580 for current-outgoing; Tue, 4 Jul 1995 07:37:54 -0700 Received: from wc.cdrom.com (wc.cdrom.com [192.216.223.37]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id HAA26574 for ; Tue, 4 Jul 1995 07:37:52 -0700 Received: from minnow.render.com (render.demon.co.uk [158.152.30.118]) by wc.cdrom.com (8.6.12/8.6.12) with ESMTP id HAA09545 for ; Tue, 4 Jul 1995 07:37:43 -0700 Received: (from dfr@localhost) by minnow.render.com (8.6.9/8.6.9) id PAA13281; Tue, 4 Jul 1995 15:35:15 +0100 Date: Tue, 4 Jul 1995 15:35:14 +0100 (BST) From: Doug Rabson To: freebsd-current@freebsd.org, Joerg Wunsch cc: freebsd-current@freebsd.org Subject: Re: /etc/rc and "rm -f /var/spool/lock/*" In-Reply-To: <199507041211.OAA00756@uriah.heep.sax.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@freebsd.org Precedence: bulk On Tue, 4 Jul 1995, J Wunsch wrote: > As Harlan Stenn wrote: > > > > I suspect the real solution, then, will be to file ijppp. > > > > The problem is that when I start up "ppp -auto", it will almost always > > come up with the same PID as the one from the previous boot, so if the > > Interesting race condition. :( Easy to test for though: lockpid = pid from file; if (lockpid == getpid() || !process_exists(lockpid)) stale lock file; else line is locked; -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 251 4411 FAX: +44 171 251 0939