From: Ian Jackson Date: Fri, 18 Oct 2024 16:39:20 +0000 (+0100) Subject: Remove otiose debug messages X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=8adf563748c1ba034479e833aff4f3d616cc6e64;p=innduct.git Remove otiose debug messages In certain operational circumstances, this can generate unreasonable volumes of debug output (3-4 lines per attempt to process an article). Signed-off-by: Ian Jackson --- diff --git a/filemon.c b/filemon.c index c531f40..24af5f5 100644 --- a/filemon.c +++ b/filemon.c @@ -35,11 +35,11 @@ static void filemon_method_startfile(InputFile *ipf, Filemon_Perfile *pf) { 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); @@ -67,7 +67,10 @@ static void *filemon_inotify_readable(oop_source *lp, int fd, * 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: