Can the user program close the fd after registering the notification, or does every registered fd need to remain open?
Several questions in this thread can be answered by looking at the patch. For example, at http://www.kernel.org/pub/linux/kernel/people/rml/inotify/v2.6/0.23/inotify-0.23-rml-2.6.13-rc2-1.patch.
Indeed the user program can close the fd of the file/directory being watched. Closing the fd associated with the watch (which can be associated with many files/directories) will turn the watch off.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds