in reply to Lock Effectivity

Looks good to me. Provided that you're not locking files over a broken version of NFS, or something similar, no other instances of that program should be able to enter the critical section at the same time another is.