From 5228ba2fe881133ccc0f9b3ad8a1ebbe9112a6f2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 2008 22:40:27 +0000 Subject: * nscd/nscd.h (struct database_dyn): Add inotify_descr and clear_cache fields. * nscd/connections.c (inotify_fd): New variable. (nscd_init): Try to open an inotify descriptor. If successful, watch files for databases using inotify instead of having prune threads stat the files. (nscd_run_prune): Recognize clear_cache flag being set and call prune_cache appropriately. (main_loop_poll): Add inotify descriptor to wait set and handle the reported changes. (main_loop_epoll): Likewise. * nscd/cache.c (prune_cache): Don't stat files for databases if inotify is used. * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] (CFLAGS-connections.c): Add -DHAVE_INOTIFY. --- sysdeps/unix/sysv/linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ddbb4f68f8..c93538c1ea 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -154,7 +154,7 @@ CFLAGS-mq_receive.c += -fexceptions endif ifeq ($(subdir),nscd) -CFLAGS-connections.c += -DHAVE_EPOLL -DHAVE_SENDFILE +CFLAGS-connections.c += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY CFLAGS-pwdcache.c += -DHAVE_SENDFILE CFLAGS-grpcache.c += -DHAVE_SENDFILE CFLAGS-hstcache.c += -DHAVE_SENDFILE -- cgit 1.4.1