mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-12 14:17:47 +00:00
terminate in case of no-sace-left-on-device when adding a user watch. ignore all other errors
This commit is contained in:
parent
09a0af3495
commit
c21620d3e6
@ -100,6 +100,13 @@ l_addwatch(lua_State *L)
|
||||
|
||||
int wd = inotify_add_watch(inotify_fd, path, mask);
|
||||
if (wd < 0) {
|
||||
if (errno == ENOSPC) {
|
||||
printlogf(L, "Error",
|
||||
"Terminating since out of inotify watches.");
|
||||
printlogf(L, "Error",
|
||||
"Consider increasing /proc/sys/fs/inotify/max_user_watches");
|
||||
exit(-1); // ERRNO.
|
||||
}
|
||||
printlogf(L, "Inotify", "addwatch(%s)->%d; err=%d:%s", path, wd,
|
||||
errno, strerror(errno));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user