summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Frederic Clere <jfclere@apache.org>2006-07-29 11:43:25 +0000
committerJean-Frederic Clere <jfclere@apache.org>2006-07-29 11:43:25 +0000
commitd514bfb90b8fca80f50e7402179d8c37a18bc847 (patch)
tree3e0f2d7057f38e01cfc787f5e68df9fa1cae34b8
parent837b3515beaca44a9fd88cbe7e4e3d5989ae7001 (diff)
downloadhttpd-d514bfb90b8fca80f50e7402179d8c37a18bc847.tar.gz
Create the directory for the path to the shared memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-proxy-scoreboard@426781 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/mem/sharedmem_util.c9
-rw-r--r--support/proxymonitor.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/modules/mem/sharedmem_util.c b/modules/mem/sharedmem_util.c
index 2cf12817c8..d5a76dc7e9 100644
--- a/modules/mem/sharedmem_util.c
+++ b/modules/mem/sharedmem_util.c
@@ -88,9 +88,18 @@ static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, apr_
ap_slotmem_t *res;
ap_slotmem_t *next = globallistmem;
char *fname;
+ char *dir, *sep;
+ char *dname;
apr_status_t rv;
fname = ap_server_root_relative(pool, name);
+ dir = apr_pstrdup(pool, name);
+ sep = strrchr(dir, '/');
+ if (sep != NULL) {
+ *sep++ = '\0';
+ dname = ap_server_root_relative(pool, dir);
+ apr_dir_make(dname, APR_UREAD|APR_UWRITE|APR_UEXECUTE, pool);
+ }
/* first try to attach to existing slotmem */
if (next) {
diff --git a/support/proxymonitor.c b/support/proxymonitor.c
index ad31c2d924..5c26c51470 100644
--- a/support/proxymonitor.c
+++ b/support/proxymonitor.c
@@ -101,6 +101,10 @@ char * ap_server_root_relative(apr_pool_t *p, const char *name)
}
return fname;
}
+char * ap_strrchr(char *s, int c)
+{
+ return strrchr(s,c);
+}
/*
* called on SIGINT or SIGTERM