2) Mac OS 10.3 Server. The drive being shared is formatted in Mac OS Extended (Journaled) being shared using AFP.
This is the key. AFP does not support file locking. Any file locking calls on an AFP file will return ENOTSUP which means "nice try, but we at Apple didn't get around to implementing remote file locking in the Unix fcntl() function."
The gist of this is that in order to implement locking of AFP files, I would need to hunt down all of the file locking calls in the OpenOffice.org code and replace them with code that invokes Apple's special AFP file locking functions if the file is on an AFP volume.
This is not a trivial amount of work and, as such, would require a donor to fund it.
Posted: Wed Mar 02, 2005 2:04 am Post subject: Re: File Locking
pluby wrote:
jonny> wrote:
2) Mac OS 10.3 Server. The drive being shared is formatted in Mac OS Extended (Journaled) being shared using AFP.
This is the key. AFP does not support file locking. Any file locking calls on an AFP file will return ENOTSUP which means "nice try, but we at Apple didn't get around to implementing remote file locking in the Unix fcntl() function."
The gist of this is that in order to implement locking of AFP files, I would need to hunt down all of the file locking calls in the OpenOffice.org code and replace them with code that invokes Apple's special AFP file locking functions if the file is on an AFP volume.
This is not a trivial amount of work and, as such, would require a donor to fund it.
Patrick
Thanks Patrick for the explanation.
For those of you are interested, a more technical explanation can be found at :
pluby> wrote:This is the key. AFP does not support file locking.
Patrick,
The locking issue that LAW and jonny are talking about also occurs when sharing a drive using SMB instead of AFP. Is there any possibility of achieving our file locking goal using SMB sharing instead, or does that still require hunting down the file locking calls in OpenOffice?
The locking issue that LAW and jonny are talking about also occurs when sharing a drive using SMB instead of AFP. Is there any possibility of achieving our file locking goal using SMB sharing instead, or does that still require hunting down the file locking calls in OpenOffice?
Most likely, the same OOo code is failing for both AFP and SMB. The unknown is why are the Unix file locking calls that OOo uses failing for SMB? Does you SMB server not support remote file locking or does Mac OS X's SMB client implementation not support file locking?
These are the questions that would need to be answered. Unfortunately, I don't have much time to do this but if there are any C developers out there that could write some test code, the OOo code call the fcntl() function with F_SETLK. If I knew what error values to look for (e.g. this function will return an error and set the errno global variable to ENOTSUP for AFP files) and what alternative functions I could try to use in such cases, I could splice the test code into Neo/J.
I may be able to give this a poke and see what happens, at least on SMB shares using Samba (3.0.3). I could test AppleShare from OS 9 but that would have to wait until Monday.
All times are GMT - 7 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum