in reply to Advisory locking to 'lock' a directory
in thread fastest way to open a file and storing it?

And you think the kernel is going to pay attention to any locks a user program might have? We are talking about the /proc file system here.

The content of the /proc filesystem rapidly changes, and there isn't much you can do about it. Remember that /proc is nothing more than some hooks inside the kernel. Processes come and go, and so do their associated files in /proc.

Abigail