without looking at what the PSP code is doing ... an article on this subject, specific to file locking on linux ...
http://lists.jammed.com/ISN/2003/06/0104.html Tony On 11/1/05, L505 <[EMAIL PROTECTED]> 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. > > SVN: > https://opensvn.csie.org/pspcgi/psp-1.5.x-devel/src/fileshare.pp > > For documentation on how those units would be used, check: > http://z505.com/cgi-bin/psp/docs/1.4.1/psp_doc_i.cgi?p=mod.fileshare.html > > Again, these units and documentation were written with regards to CGI > programming. However, > file sharing is not specific to cgi programming of course! > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal