From owner-freebsd-current Tue May 6 11:20:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA26098 for current-outgoing; Tue, 6 May 1997 11:20:41 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA26093 for ; Tue, 6 May 1997 11:20:39 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA18955; Tue, 6 May 1997 11:17:34 -0700 From: Terry Lambert Message-Id: <199705061817.LAA18955@phaeton.artisoft.com> Subject: Re: Bug: is it the kernel or the man page? To: joerg_wunsch@uriah.heep.sax.de Date: Tue, 6 May 1997 11:17:34 -0700 (MST) Cc: current@FreeBSD.ORG In-Reply-To: <19970506080539.EO65418@uriah.heep.sax.de> from "J Wunsch" at May 6, 97 08:05:39 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > PPPS: The F_POSIX should be F_LOCKF; the flag is used to indicate the > > system call entry it came in on, not the semantic tagging. > > I don't care much for this detail. Well, it presumes that there is nothing but POSIX when it comes to record locking. 8-(. Personally, I can't see where POSIX *technically* mandates this behaviour, but Solaris does it too, so I'll let it pass. Layered software weenies. > > PPPPS: There should be an F_NONPOSIX to again seperate the name space > > so the flag could be set to avoid the behaviour; > > You mean, record locking without the Posix braindeadness? > > If so, invent something new. Don't do it with fcntl() F_SETLK, or it > will confuse the heck out of the people. Well, I was actually thinking along the lines of: fcntl( fd, F_SETLK | F_NONPOSIX, &flock); Using F_SETLK as a namespace selector. It also seems to me that this needs to be flagged on the top level lock, since one type of locking should preclude any other type of locking on the same file, for interoperability reasons. I also want to support mandatory file locking: if the file is SGID *and* the group execute bit is not set, the file would not be allowed to be mmap'ed, and a flag would be set duirng the open to indicate mandory locking was in effect. The read and write operations would check the flag, and, if present, verify the existance of a lock of the appropriate type for the requested range. The operation would be denied if the lock was not asserted. I also want to do the NFS lockd primitives which were never integrated before the Lite2 merge. > There are other people capable of fixing man pages as well. I think > the only change by now should be to add a hint to fcntl-style locking > to close(2). This is exactly the man page fix I want. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.