if (pf->wd < 0) sysdie("filemon inotify: inotify_add_watch %s", ipf->path);
LIST_ADDHEAD(filemon_inotify_watches, pf);
- dbg("filemon inotify: startfile %p wd=%d pf=%p", ipf, pf->wd, pf);
+ //dbg("filemon inotify: startfile %p wd=%d pf=%p", ipf, pf->wd, pf);
}
static void filemon_method_stopfile(InputFile *ipf, Filemon_Perfile *pf) {
- dbg("filemon inotify: stopfile %p wd=%d pf=%p", ipf, pf->wd, pf);
+ //dbg("filemon inotify: stopfile %p wd=%d pf=%p", ipf, pf->wd, pf);
int r= inotify_rm_watch(filemon_inotify_fd, pf->wd);
if (r) syscrash("filemon inotify: inotify_rm_watch");
LIST_REMOVE(filemon_inotify_watches, pf);
* unexpected random watch events as normal. It's not a
* correctness problem as the watch is just a prod to read a file,
* which is harmless if it does not need to be read. */
- dbg("filemon inotify: read event with unknown wd=%d", iev.wd);
+ /* When we are at the queue limit, each time we manage to process
+ * an article, we disable and re-enable the watch, and the disabled
+ * watch generates one or two of these "unknown wd" events. */
+ //dbg("filemon inotify: read event with unknown wd=%d", iev.wd);
continue;
found: