summaryrefslogtreecommitdiffstats
path: root/modules/mem/mod_sharedmem.c
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2009-01-03 01:42:53 +0100
committerRainer Jung <rjung@apache.org>2009-01-03 01:42:53 +0100
commit9f305f9f0ec4d18a987db4a248b08457d0e72b27 (patch)
tree2fd52aad19247de0b38fd4ec9ec2e437a54badcc /modules/mem/mod_sharedmem.c
parentUse LDADD mechanism to only link mod_serf resp. (diff)
downloadapache2-9f305f9f0ec4d18a987db4a248b08457d0e72b27.tar.xz
apache2-9f305f9f0ec4d18a987db4a248b08457d0e72b27.zip
Need to close temporary file before using it
for global mutex (at least on Solaris). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/mem/mod_sharedmem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/mem/mod_sharedmem.c b/modules/mem/mod_sharedmem.c
index 874682a844..868391d8c1 100644
--- a/modules/mem/mod_sharedmem.c
+++ b/modules/mem/mod_sharedmem.c
@@ -432,6 +432,13 @@ static int post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, serve
return rv;
}
+ rv = apr_file_close(fmutex);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "sharedmem: could not close mutex file");
+ return rv;
+ }
+
rv = apr_global_mutex_create(&smutex,
mutex_fname, APR_LOCK_DEFAULT, p);
if (rv != APR_SUCCESS) {