Re: How to monitor a directory in FreeBSD?
- In reply to: Michał_Górny : "Re: How to monitor a directory in FreeBSD?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Aug 2022 21:10:03 UTC
On 8/13/22 21:19, Michał Górny wrote: > > I'm afraid I'm going to be a bit of spoilsport but please bear in mind > that inotify -- at least on Linux -- is not 100% reliable (or at least > it wasn't the last time I've used it). In general, it's a great > optimization but your program also needs to have fallback logic to > periodically check for changes that weren't reported. > Yeah yeah, I read inotify(7), I know that the queue can overflow, events can be lost, it can collapse events when they are identical, there are limits, the filesystem might not support inotify, the files or the monitored directory itself could be symlinks or can have a symlink in its path which can be broken, can cycle and can cause security vulnerabilities, there can be mountpoints involved which behave differently than everything else, there can be permission issues, some syscalls can bypass some monitoring, that handling renaming of files and directories is hell...