Kornel Benko wrote:

> Am Montag, 25. November 2013 um 22:48:11, schrieb Vincent van Ravesteijn
> <v...@lyx.org>
>> Georg Baum schreef op 25-11-2013 21:09:
>> 
>> > However, in this particular case, the code has a problem:
>> > support::fileLock() and support::fileUnlock() behave _very_ differently
>> > depending on the platform, although the underlying concept (locking
>> > files) works fine on any platform supported by LyX. I don't care if it
>> > is called nonportable or something else, but it is a problem, since on
>> > windows the functions do not do what their names suggest.
> 
> Could you please be more specific? I could not find anything about lockf()
> for windows, so what behaves differently (apart from the fact not being
> implemented)?

lockf() is not available on windows, as I wrote in a previous message (it is 
from a POSIX standard). In the cited paragraph above I tried to look at the 
functions fileLock() and fileUnlock() in src/support/filetools.cpp from a 
more general perspective: : These do only lock and unlock files if LyX was 
built using cmake on a unix like OS. They do not work if you are on windows 
or use autotools to build LyX. This is IMO a problem. BTW it would be the 
same problem if it would only work with autotools or only on windows. The 
implementation details do not matter, if there are functions in LyX to lock 
and unlock files then they should work on all supported OSes and build 
systems.

> There seems to be a function _locking(), which could be
> used, but I am not on windows ...

Me neither as far as LyX is concerned. I have no idea if _locking() could be 
used.

I hope my concerns are clear now?


Georg

Reply via email to