mirror of
https://github.com/troglobit/finit.git
synced 2026-10-11 17:02:42 +07: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:
+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