How to check if a file has been opened by another application in C++?

Not only the standard library does not have this funcionality, it’s not even possible in general. You could (on linux) check /proc/*/fd — but it is possible that your program does not have permission to do it on processes from other users (this is the default in Ubuntu, for instance).

Leave a Comment