mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
iwatch: ignore EEXIST errors, we're already watching it
In particular this can happen from cgroup.c when multiple services map to the same cgroup.events (due to being in the same cgroup) Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
9c2f0b2dc8
commit
9ba57f0c9d
1 file changed
+2
-1
+2
-1
@@ -94,7 +94,8 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask)
|
||||
|
||||
wd = inotify_add_watch(iw->fd, path, IWATCH_MASK | mask);
|
||||
if (wd < 0) {
|
||||
_pe("Failed adding watcher for %s", path);
|
||||
if (errno != EEXIST)
|
||||
_pe("Failed adding watcher for %s", path);
|
||||
free(path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user