Index: glibc-2.11.3/nscd/cache.c =================================================================== --- glibc-2.11.3.orig/nscd/cache.c 2012-10-18 06:34:23.000000000 +0200 +++ glibc-2.11.3/nscd/cache.c 2012-10-18 11:15:44.000000000 +0200 @@ -264,7 +264,6 @@ prune_cache (struct database_dyn *table, /* If we check for the modification of the underlying file we invalidate the entries also in this case. */ - if (table->inotify_descr < 0 && table->check_file && now != LONG_MAX) { struct stat64 st; time_t mtime; Index: glibc-2.11.3/nscd/connections.c =================================================================== --- glibc-2.11.3.orig/nscd/connections.c 2012-10-18 06:34:23.000000000 +0200 +++ glibc-2.11.3/nscd/connections.c 2012-10-18 11:20:45.000000000 +0200 @@ -848,11 +848,14 @@ cannot set socket to close on exec: %s; if (dbs[cnt].check_file) { #ifdef HAVE_INOTIFY - if (inotify_fd < 0 - || (dbs[cnt].inotify_descr + if (inotify_fd >= 0) + { + dbs[cnt].inotify_descr = inotify_add_watch (inotify_fd, dbs[cnt].filename, - IN_DELETE_SELF | IN_MODIFY)) < 0) - /* We cannot notice changes in the main thread. */ + IN_DELETE_SELF | IN_MODIFY); + } + /* Always fall back to checking file modification times. In its + current form the inotify check is totally unreliable */ #endif { /* We need the modification date of the file. */