Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!sri-unix!hplabs!hpcea!hpda!hpirs!hpisod1!hpisoa1!davel From: davel@hpisoa1.HP.COM (Dave Lennert) Newsgroups: comp.unix.wizards Subject: Re: lockf and the SVID, (Was "Re: Wanted: lockf system call source") Message-ID: <2200007@hpisoa1.HP.COM> Date: Thu, 18-Dec-86 12:35:06 EST Article-I.D.: hpisoa1.2200007 Posted: Thu Dec 18 12:35:06 1986 Date-Received: Sat, 20-Dec-86 21:45:23 EST References: <2264@sdcsvax.UCSD.EDU> Lines: 35 Thanks for all your explanations. Much confusion arose because, in my original posting, I said fcntl() once when I meant lockf(). Also my question was not well worded in general. I apologize. Some caught the thrust of my question, which was that lockf() (as implemented in SysV on top of fcntl()) requires write permission to the file descriptor in order to do locking. This is not strictly compatible with the /usr/group specification of lockf() which merely states that it needs "an open file descriptor". Arguments about the appropriateness of the lockf() interface aside, my point was that the SysV lockf() does not correctly implement the specification from /usr/group, and hence customers may have problems importing programs using lockf() from other systems. For example, if my application attempts to do "read locking" via lockf() on a file descriptor that it only has read access to, it will fail on Sys V. (Note that lockf() doesn't make the distinction between read and write locking.) Again, my point is not whether SysV lockf() is better but whether it is compatible. I meant to solicit input from the community as to which they felt was more important ("better" or "compatible"); I'm especially interested in whether anyone out there has an existing application which relies on lockf() working on a file descriptor without read permission. Thanks to Daniel Steinberg of Sun Microsystems (sun!dss) whose private mail clarified these issues for me. Thanks again. Dave Lennert ucbvax!hpda!davel [UUCP] Hewlett-Packard - 47UX ihnp4!hplabs!hpda!davel [UUCP] 19447 Pruneridge Ave. hpda!davel@Berkeley.edu [ARPA] Cupertino, CA 95014 (408) 447-6325 [AT&T]