From owner-freebsd-hackers Sun Aug 22 22: 4:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 2AE6C14DC1; Sun, 22 Aug 1999 22:04:45 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id WAA01860; Sun, 22 Aug 1999 22:04:38 -0700 (PDT) (envelope-from dillon) Date: Sun, 22 Aug 1999 22:04:38 -0700 (PDT) From: Matthew Dillon Message-Id: <199908230504.WAA01860@apollo.backplane.com> To: Greg Lehey Cc: FreeBSD Hackers , FreeBSD Committers Subject: Re: Mandatory locking? References: <19990823095310.A83273@freebie.lemis.com> <199908230031.RAA00909@apollo.backplane.com> <19990823100654.B83273@freebie.lemis.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Somehow you need to get a lock. : :> You mean have one program make a fcntl call that causes other :> programs to return an error or block if they try to open that :> file while the first program holds an open descriptor? : :Correct. I suppose it's worth discussing what the default should be. :Should they get EAGAIN or block? Obviously you'd want a way of :specifying which, but there would have to be a default for :non-lock-aware programs. I think I'd go for blocking; it's less error :prone. : :Greg I dunno, it sounds pretty icky to me. I would redesign whatever you are doing that requires mandatory locks to use advisory locks instead. It can be as simple as a wrapper around whatever program your users are running that is causing whatever the problem is. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message