|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^2: What the flock!? Concurrency issues in file writing.by bluto (Curate) |
| on Oct 01, 2008 at 17:02 UTC ( #714842=note: print w/ replies, xml ) | Need Help?? |
|
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
|
|
||||||||||||||||||||