in reply to Re: What the flock!? Concurrency issues in file writing.
in thread What the flock!? Concurrency issues in file writing.
This won't work all of the time since there is a race condition. If two processes get past the 1 until -w $file line simultaneously. One will end up die'ing when the rename fails. Update: changed "while" to "until".
|
---|
In Section
Seekers of Perl Wisdom