in reply to File locking

I've often wondered the same. My undertanding is that all processes must agree on the lock. What if you are writing and a read comes along? I almost always play it safe and just do the flock _SH