|
Re: register_shutdown_function() not behaving as expected
The 'x' parameter make the fopen function return a FALSE if the file already exists. So basically the idea is that if you wanted to lock a file like 'tmp.txt'. Another file called tmp.txt.lck would be created. Any other process that tried to lock it (by creating tmp.txt.lck) would fail. Of course one would have to program those other scripts to poll (by sleeping for some period) the lock. Or I may actually program that into the acquireLock() method if the fopen function returns a failure, then sleep and try again and only return on a successful lock acquisition. That's actually what the thread regarding "file locking without using flock()" was about.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
|