]> git.ipfire.org Git - thirdparty/glibc.git/commit - nscd/connections.c
* nscd/nscd.h (struct database_dyn): Add inotify_descr and clear_cache
authorUlrich Drepper <drepper@redhat.com>
Thu, 12 Jun 2008 22:40:27 +0000 (22:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 12 Jun 2008 22:40:27 +0000 (22:40 +0000)
commit5228ba2fe881133ccc0f9b3ad8a1ebbe9112a6f2
tree226b31672d444eaf3ad88b7ee96bbf55d660b8dd
parent5a337776da5b7ff1dbbf0fdcd093a3b6af2cdf83
* 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.
ChangeLog
nscd/cache.c
nscd/connections.c
nscd/nscd.h
sysdeps/unix/sysv/linux/Makefile