descriptor-oriented file locking?


Subject: descriptor-oriented file locking?
From: Martin Baker (god@jfitzpat.student.harvard.edu)
Date: Thu Oct 31 1996 - 05:10:48 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



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:24:17 EST