From owner-freebsd-current Sun Nov 7 10:41:55 1999 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 2378214C01 for ; Sun, 7 Nov 1999 10:41:47 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 7 Nov 1999 18:41:46 +0000 (GMT) Date: Sun, 7 Nov 1999 18:41:46 +0000 From: David Malone To: Ben Smithurst Cc: current@freebsd.org Subject: Re: Serious locking problem in CURRENT Message-ID: <19991107184146.A22208@walton.maths.tcd.ie> References: <199911061929.NAA26145@free.pcs> <19991107112458.A14670@walton.maths.tcd.ie> <19991107142826.A2118@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <19991107142826.A2118@strontium.scientia.demon.co.uk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The lock doesn't seem to be released until *explicitly* released, like > the manual page says. I don't think closing the descriptor counts as > an explicit unlock, though I am probably wrong. Run this program, > you'll see the parent still has the lock. Change close(fd) to flock(fd, > LOCK_UN) and you'll see it doesn't. It's possible I've misunderstood > something though. On -current it seems to be unlocking regardless - which I think it the problem. If you have to explicitly unlock then that seems fine. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message