I think you've misunderstood--that's exactly what it does NOT do. If there are two filehandles open on a given file (regardless of whether they are opened by one process or two seperate processes), when one of them is closed, all locks are removed. So if process A and process B have shared locks on a file, as soon as A closes his handle, B loses his lock. If process C has two handles and two locks on another file, then both locks are cleared as soon as one handle is closed.