Re: XML file locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bruce wrote:
Couldn't you also create a rather simple test to determine if the locking of the file takes place?

I personally do not trust file system level locks. Even if a software is not intended to be portable across operating systems, it is possible to use different file systems under the same operating system, and the rules might be different. Using file system level locks would require all possible file systems to be taken into account. And on top of that, the file systems are actively developed, so this is one more point to monitor, while maintaining the software. A less trouble free way is to create a file with the same name and extension ".locked" or similar, prior to read/write operations. Of course, this works only if the file is accessing only by one program, or if all programs accessing the file follow the same convention - but you should see that many file system level locks are advisory, as well.

See this -

http://en.wikipedia.org/wiki/File_locking

--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux