[fpc-pascal] File locking/protection in Linux
tpelton at gmail.com
Wed Nov 2 04:16:18 CET 2005
without looking at what the PSP code is doing ...
an article on this subject, specific to file locking on linux ...
On 11/1/05, L505 <fpc505 at z505.com> wrote:
> > How can be avoided in Linux the file corruption due to simultaneous write
> > access from two different process?
> > Or how can it be avoided to access the same file by two different process?
> > I experienced a few (but painful) data loss due to this problem, and I'm
> > unable to solve the problem.
> The Pascal Server Pages project has a unit in it that allows this if you are interested. It
> is not specific to Pascal Server Pages as far as I know.
> Basically how it works is a simple time delay is put on the file until it is free again.
> You can check FileShare.pp if you are intersted in a file locking read/write method.
> For documentation on how those units would be used, check:
> Again, these units and documentation were written with regards to CGI programming. However,
> file sharing is not specific to cgi programming of course!
More information about the fpc-pascal