Calling inotify_rm_watch() on inotify fd will remove watches for
all processes that share that inotify fd. This means that every
process that uses dlog and forks will have the dynamic config
feature broken.
This commit fixes that by removing the erroneous rm_watch.
Change-Id: If023d75937b5b435e2188aca7f70b57ce964c767
if (inotify_fd < 0)
return;
- inotify_rm_watch(inotify_fd, inotify_wd);
+ /* Important: We can not call inotify_rm_watch() here - the
+ * process might have forked, sharing inotify_fd. Removing the
+ * watch would break monitoring capability in all processes
+ * sharing the inotify_fd.
+ */
inotify_wd = -1;
close(inotify_fd);