Subject: descriptor-oriented file locking?

From: Martin Baker <[email-masked]>
Date: Thu, 31 Oct 1996 05:10:48 -0500 (EST)

I am experimenting with getting byte-range locking working on netatalk. 
However, I have run into the following brick wall:

lockf, flock, and fcntl are all what I call "process-oriented", in that
they help *processes* cooperate about locking.  But since one afpd child
handles file locks that may originate from different programs on the
originating Mac, I need "descriptor-oriented" file locking (a file opened
by two different programs on the Mac is manipulated through two different
file descriptors). 

Does anyone know if such a routine exists on any netatalk platform, 
(preferably specified by POSIX)?

If this is not possible, I have two options: set up a scheme for each 
afpd process to organize file locking for multiple client programs per 
connection, or make file locking between different connections coherent 
(thus hopefully allowing the use of programs such as Filemaker Pro), but 
allow the possibility that a file opened twice by the same Mac may become 
corrupt.

Which of these two would people prefer to see?

BTW, my development platform is Linux 2.0.23.

Martin