Yes, all bets are off in the case of a kernel/filesystem bug. But I am unconvinced that it is better to make it manual. I prefer the simpler code on general principles. But I would also isolate the calls into an atomic interface so that if something did go wrong I could fix more easily. Besides which, then I am in a better position to move to fcntl or some other kind of locking if I need it at some point.
BTW I already did isolate locking somewhere else. And now you cannot complain that nobody has posted examples where the return code of flock is checked. :-)
UPDATE
Thanks tye for pointing out that one not was not wanted.
That noted not was not for naught. :-)
In reply to Re (tilly) 2: Can't find it :-(
by tilly
in thread flock - lordy me....
by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |