> Sorry to harp on this, but a lock file will not work in every
> case. Shared
> memory will not work. Every implementation of this results
> in code that has
> to:
>
> 1) check for lock
> 2) lock
The following should be atomic, and thus can be used for a **simple**
locking mechanism:
use Fcntl;
until ( sysopen F, $lockfile, O_CREAT|O_EXCL ) {
sleep 10;
}
close F;
# ok from here on out
# ...
# done, unlink
unlink $lockfile;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]