I have a big folder of many (40,000+) files that are watched by at least 3 programs each one using inotify watches to detect changes (media servers, sync apps,...).

Each program runs it's own instance of inotify, consuming a lot of watches, and memory.

Is there a way to "reuse" or "share" an instance of inotify ? The way I understand it, it seems to me that at the moment each program I run uses his own inotify instance with a separate set of watches.

I already searched the web and SE, but didn't find any relevant information regarding sharing/reusing inotify instances/watches

  • incron perhaps? – roaima Jun 14 '16 at 16:29
  • inotify events are sent through a file descriptor. I would be highly surprised if you couldn't just share this file descriptor between processes. – Patrick Jun 14 '16 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.