[EMAIL PROTECTED] on 07/10/2000 01:11:15 PM
>> One method to create locks is to use 'mkdir' within an 'if'
>> statement (something like):
>
>Definitely - especially since this method also works over NFS mounts
>(where a mkdir operation is still atomic). Of course you also have
>to be willing to lock an entire execution of rsync as opposed to just
>the file it is working on at any given moment.
This isn't necessarily true. If one decides to rsync one directory at a time
and the lock exists within the directory being rsync'd, then several rsyncs (and
other processes) can run at one time -- only the rsyncs within the same
directory will block. If a naming scheme were prescribed, one can even have
per-file locks (this would probably be very costly in process overhead and disk
access, though).
This scheme (ie 'mkdir lock') can even be extended to support separate read and
write locks.
Noel
This communication is for informational purposes only. It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.