chuck 97/05/29 08:16:04
Modified: src/modules/proxy proxy_cache.c Log: Close timestamp file after open/create; partial fix for PR#624 Revision Changes Path 1.13 +3 -2 apache/src/modules/proxy/proxy_cache.c Index: proxy_cache.c =================================================================== RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_cache.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C3 -r1.12 -r1.13 *** proxy_cache.c 1997/04/06 07:43:48 1.12 --- proxy_cache.c 1997/05/29 15:16:01 1.13 *************** *** 98,104 **** array_header *files; struct stat buf; struct gc_ent *fent,**elts; ! int i; static time_t lastcheck=BAD_DATE; /* static data!!! */ cachedir = conf->root; --- 98,104 ---- array_header *files; struct stat buf; struct gc_ent *fent,**elts; ! int i, timefd; static time_t lastcheck=BAD_DATE; /* static data!!! */ cachedir = conf->root; *************** *** 122,128 **** unblock_alarms(); return; } ! if (creat(filename, 0666) == -1) { if (errno != EEXIST) proxy_log_uerror("creat", filename, NULL, r->server); --- 122,128 ---- unblock_alarms(); return; } ! if ((timefd = creat(filename, 0666)) == -1) { if (errno != EEXIST) proxy_log_uerror("creat", filename, NULL, r->server); *************** *** 131,136 **** --- 131,137 ---- unblock_alarms(); return; } + close(timefd); } else { lastcheck = buf.st_mtime; /* save the time */