Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 1997 11:17:34 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        current@FreeBSD.ORG
Subject:   Re: Bug: is it the kernel or the man page?
Message-ID:  <199705061817.LAA18955@phaeton.artisoft.com>
In-Reply-To: <19970506080539.EO65418@uriah.heep.sax.de> from "J Wunsch" at May 6, 97 08:05:39 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705061817.LAA18955>