On Thu, Oct 24, 2002 at 11:48:53AM -0700, Ben Johnson wrote: > > samba and vi aren't written to cooperate for example. should these be > written to cooperate? that would mean the authors of each would have to > cooperate. it seems like it would be easier to have the kernel force > cooperation.
If you're using a text editor that wantes exclusive use of a file, the text editor should get an fcntl or Windows write lock across the entire contents of the file before allowing any modification. That's what you actually intend. Allowing a "share mode" that operates accross an entire open is a hack (IMHO). Samba and vi don't have to co-operate, Samba just allows Windows apps to see each others byte-range locks. It's the apps on Windows and the UNIX apps that have to co-operate. Jeremy.
