summaryrefslogtreecommitdiffabout
path: root/src/watcher.c
Unidiff
Diffstat (limited to 'src/watcher.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/watcher.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/watcher.c b/src/watcher.c
index f8761ee..c52e3e6 100644
--- a/src/watcher.c
+++ b/src/watcher.c
@@ -83,9 +83,16 @@ create_watcher (struct spool *sp, void *data)
83 83
84 if (!sp) 84 if (!sp)
85 return 0; 85 return 0;
86
87 if (!sp->inotify_enable)
88 {
89 if (debug_level > 1)
90 logmsg (LOG_DEBUG, "disabling inotify support for spool %s", sp->tag);
91 return 0;
92 }
86 93
87 if (debug_level > 1) 94 if (debug_level > 1)
88 logmsg (LOG_DEBUG, "creating watcher %s", path); 95 logmsg (LOG_DEBUG, "spool %s: creating watcher %s", sp->tag, path);
89 dwp = malloc (sizeof(*dwp)); 96 dwp = malloc (sizeof(*dwp));
90 if (!dwp) 97 if (!dwp)
91 { 98 {
@@ -113,6 +120,13 @@ int
113watcher_init () 120watcher_init ()
114{ 121{
115 int ifd, rc; 122 int ifd, rc;
123
124 if (!inotify_enable)
125 {
126 if (debug_level > 1)
127 logmsg (LOG_DEBUG, "disabling inotify support");
128 return -1;
129 }
116 130
117 if (debug_level > 1) 131 if (debug_level > 1)
118 logmsg (LOG_DEBUG, "setting up inotify"); 132 logmsg (LOG_DEBUG, "setting up inotify");

Return to:

Send suggestions and report system problems to the System administrator.