diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-04-16 09:38:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-04-16 09:38:29 +0000 |
commit | 2456406d72d9a02b97bcea7622dee93a031b97f5 (patch) | |
tree | cb309fa9e5e872e0eee5615c4a3b59339e02af9e | |
parent | 3d08d8004c93a53b32f6a977d32fc92569a96023 (diff) | |
download | glibc-2456406d72d9a02b97bcea7622dee93a031b97f5.zip glibc-2456406d72d9a02b97bcea7622dee93a031b97f5.tar.gz glibc-2456406d72d9a02b97bcea7622dee93a031b97f5.tar.bz2 |
Update.
1999-04-16 Ulrich Drepper <drepper@cygnus.com>
* nscd/cache.c (prune_cache): Only disable file checking for
future if the file does not exist.
Update file_mtime if cache was flushed.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | nscd/cache.c | 8 |
2 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,9 @@ +1999-04-16 Ulrich Drepper <drepper@cygnus.com> + + * nscd/cache.c (prune_cache): Only disable file checking for + future if the file does not exist. + Update file_mtime if cache was flushed. + 1999-04-15 David S. Miller <davem@redhat.com> * sysdeps/sparc/sparc32/strcat.S: Avoid using register g6. diff --git a/nscd/cache.c b/nscd/cache.c index 52ef038..e57c868 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -142,10 +142,12 @@ prune_cache (struct database *table, time_t now) if (stat (table->filename, &st) < 0) { char buf[128]; - /* We cannot stat() the file, disable file checking. */ + /* We cannot stat() the file, disable file checking if the + file does not exist. */ dbg_log (_("cannot stat() file `%s': %s"), table->filename, strerror_r (errno, buf, sizeof (buf))); - table->check_file = 0; + if (errno == ENOENT) + table->check_file = 0; } else { @@ -153,7 +155,7 @@ prune_cache (struct database *table, time_t now) { /* The file changed. Invalidate all entries. */ now = LONG_MAX; - st.st_mtime = table->file_mtime; + table->file_mtime = st.st_mtime; } } } |