From owner-freebsd-current Sat Nov 6 11:29:23 1999 Delivered-To: freebsd-current@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id EA1EC14BE0 for ; Sat, 6 Nov 1999 11:29:21 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id NAA11411; Sat, 6 Nov 1999 13:29:17 -0600 (CST) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.8.5/8.6.4) with ESMTP id NAA24877; Sat, 6 Nov 1999 13:29:16 -0600 (CST) Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id NAA26145; Sat, 6 Nov 1999 13:29:16 -0600 (CST) Date: Sat, 6 Nov 1999 13:29:16 -0600 (CST) From: Jonathan Lemon Message-Id: <199911061929.NAA26145@free.pcs> To: dwmalone@maths.tcd.ie, current@freebsd.org, Ollivier Robert Subject: Re: Serious locking problem in CURRENT X-Newsgroups: local.mail.freebsd-current In-Reply-To: References: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: > >On Sat, Nov 06, 1999 at 12:50:16AM +0100, Ollivier Robert wrote: > >A child process seems to be able to let go of a parent's lock on >4.0 by closing a file discriptor, the same doesn't seem to be true >on 3.3. From the manual page for flock: NOTES Locks are on files, not file descriptors. That is, file descriptors du- plicated through dup(2) or fork(2) do not result in multiple instances of a lock, but rather multiple references to a single lock. If a process holding a lock on a file forks and the child explicitly unlocks the file, the parent will lose its lock. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message