I know how to use inotify
to monitor changes to named files in directories, but now I wonder if it can be used to view changes to a file known only by the open file descriptor. Is it possible?
inotify_add_watch
documented as just a path name, and I don't see any other functions to add such a clock.
Otherwise, can you somehow open the open file descriptor and somehow convert it to a path in order to pass this inotify
?
Edit: this doesn't really have to be inotify, I'm just looking for a mechanism to notify when regular files were added or changed - think tail -f
and the like.
source share