Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I would start with code in the flock documentation and work from there. I would also try to be sure that nobody else is trying to write to the file. You might be able to ensure that by changing the filename that you write to. That is, instead of writing to "report", change it to "report-locksafe" in the places where you're doing locking. If you see something show up in "report" anyway, there's another writer somewhere. Also, the "do or die" idiom is good here. Check to see if your flock fails and be sure to output $! if it does. In reply to Re: What the flock!? Concurrency issues in file writing.
by kyle
|
|