process 2 opens for create - blam, process 1 data is gone
process 1 closes, releasing the flock
process 2 flocks - and continues
process 2 writes its data
process 2 closes
I guess if your goal is to have only the most recent data, you've succeeded, but you didn't need to do the flock for that... you can just leave the flocks entirely out.