Stephan Tinnemeyer wrote: > What will happen when a script crashes immediately after locking a file > (exclusively) with Perl's flock() function?
If the process is killed then all locks are released (in Linux and AFAIK 4.2BSD where flock comes from, so every system with BSD-compatible flock should work this way, however I don't know what about systems where Perl emulates flock), but if the process is stopped or it's in infinite loop, than the locks remain forever. Don't do anything very complicated when the file is locked, just open, flock, write your data and close the file. That way you won't fall into an infinite loop and your file will be locked shortly, so the other processes won't have to wait very long for their locks. - RaFaL Pocztarski, [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]