From owner-freebsd-hackers Wed Oct 2 21:18:17 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA27942 for hackers-outgoing; Wed, 2 Oct 1996 21:18:17 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id VAA27932 for ; Wed, 2 Oct 1996 21:18:12 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.0/CET-v2.1) with SMTP id EAA13438; Thu, 3 Oct 1996 04:18:09 GMT Date: Thu, 3 Oct 1996 13:18:09 +0900 (JST) From: Michael Hancock To: Terry Lambert cc: FreeBSD Hackers Subject: Re: flock/sendmail stuffup In-Reply-To: <199610011800.LAA02000@phaeton.artisoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 1 Oct 1996, Terry Lambert wrote: > > flock also has better semantics. I think fcntl() still releases all locks > > when any one process closes the file. To be more precise, locks shouldn't be released until last close(). With fcntl()/posix locking semantics it does it the bogus way. > I will have to check it. If it does, it is in error. Locks must be > explicitly released, or there is an implied release on decrement of > reference count from 1->0. In other words, it's in the close() code, > not the exit code that calls the close code. Regards, Mike Hancock