in reply to Re: Check whether a file is open
in thread Check whether a file is open

I wish there was a better way. If there is one I'd love to hear about it. If there is a filesysystem that implements something like electricians locks I'd put it on all the systems I'm responsible for.

The Reiser4 filesystem implements atomic transactions which can span multiple read/write operations. So your applications can just bunch together operations into a single transaction and not have to worry about what else is accessing the file. You have to use the Reiser-specific system calls though, otherwise it's just atomic to a single operation.

Of course Reiser4 isn't exactly what you'd call production-ready yet...