in reply to strange flock and alarm behavior
I have never found an flock-based implementation that worked satisfactorily well in a Unix environment “in the general case.” None. Never. I have long ago given up on the very thought of it...
I am eagerly awaiting the chance to be proven wrong, because the status quo is a Royal PITA.