in reply to Re: Re: Perl script crashing at lockfile ?
in thread Perl script crashing at lockfile ?

I don't know why the person wanted to lock the file.

I actually found a post on comp.lang.perl.misc that was from the guy that wrote it; here is his algorithm:

enter program while (1) look for lockfile if lockfile does not exist exit sleep 5 seconds } create lockfile ..... do normal program stuff ...... unlink lockfile exit

However, if the process died before removing the lock, it crashed the web server. The post was 7 years ago, so no doubt what has been suggested here will be _much_ better. :)

Peter