Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jul 1995 15:35:14 +0100 (BST)
From:      Doug Rabson <dfr@render.com>
To:        freebsd-current@freebsd.org, Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: /etc/rc and "rm -f /var/spool/lock/*"
Message-ID:  <Pine.BSF.3.91.950704153359.13097A-100000@minnow.render.com>
In-Reply-To: <199507041211.OAA00756@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.950704153359.13097A-100000>