I am writing a daemon controlling user activity on Linux. Is there any way to detect the opening of an arbitrary file by an arbitrary process? The preferred language is Python / C / C ++.
Linux has a group of inotifysystem calls .
inotify
There is a Python shell for named pyinotify .