HCoop
/
hcoop
/
zz_old
/
modwaklog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove waklog_cache file after creating it
[hcoop/zz_old/modwaklog.git]
/
mod_waklog.c
diff --git
a/mod_waklog.c
b/mod_waklog.c
index
bcacc55
..
9806460
100644
(file)
--- a/
mod_waklog.c
+++ b/
mod_waklog.c
@@
-1327,8
+1327,14
@@
waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
/* mmap the region */
if ( ( sharedspace = (struct sharedspace_s *) mmap ( NULL, sizeof(struct sharedspace_s), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0 ) ) != MAP_FAILED ) {
/* mmap the region */
if ( ( sharedspace = (struct sharedspace_s *) mmap ( NULL, sizeof(struct sharedspace_s), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0 ) ) != MAP_FAILED ) {
+ int err = 0;
log_error( APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: shared mmap region ok %d", sharedspace );
log_error( APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: shared mmap region ok %d", sharedspace );
- close(fd);
+ err = unlink(cache_file);
+ if (err) {
+ log_error( APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: unable to delete %s due to %d", cache_file, errno);
+ } else {
+ log_error( APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: shared cache deleted");
+ }
} else {
log_error( APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: mmap failed %d", errno );
exit(errno);
} else {
log_error( APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: mmap failed %d", errno );
exit(errno);