]> granicus.if.org Git - apache/commitdiff
Mutex directive: finish support of DefaultRuntimeDir
authorJeff Trawick <trawick@apache.org>
Tue, 7 Aug 2012 14:49:44 +0000 (14:49 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 7 Aug 2012 14:49:44 +0000 (14:49 +0000)
a partial conversion was made in r1299718, but I'm not
sure when that change is effective

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370288 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/core.xml
server/util_mutex.c

diff --git a/CHANGES b/CHANGES
index 887dfd33871b6e52319f6f7f4dec0922c4eb36ea..257af74c20e856d3434abdb33f9af59cf4cf3ae9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -25,7 +25,8 @@ Changes with Apache 2.5.0
 
   *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR:
      - APIs: ap_log_pid(), ap_remove_pid, ap_read_pid()
-     - core: the scoreboard (ScoreBoardFile) and pid file (PidFile)
+     - core: the scoreboard (ScoreBoardFile), pid file (PidFile), and
+       mutexes (Mutex)
      - mod_lbmethod_heartbeat, mod_heartmonitor: heartbeat storage file
      - mod_socache_shmcb, mod_socache_dbm: shared memory or dbm for cache
      [Jeff Trawick]
index e15b49e2fd18b0b062112ca774eb84264ec85584..fff90062011d9410506cd07ba5d365dc8b1453fc 100644 (file)
@@ -3142,9 +3142,11 @@ or specified mutexes</description>
 
     <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
     the path, if provided, is a directory where the lock file will be created.
-    The default directory is httpd's run-time file directory relative to
-    <directive module="core">ServerRoot</directive>.  Always use a local disk
-    filesystem for <code>/path/to/mutex</code> and never a directory residing
+    The default directory is httpd's run-time file directory,
+    <directive module="core">DefaultRuntimeDir</directive>.  If a relative
+    path is provided, it is relative to
+    <directive module="core">DefaultRuntimeDir</directive>.  Always use a local
+    disk filesystem for <code>/path/to/mutex</code> and never a directory residing
     on a NFS- or AFS-filesystem.  The basename of the file will be the mutex
     type, an optional instance string provided by the module, and unless the
     <code>OmitPID</code> keyword is specified, the process id of the httpd
index e49cca5570e352cb49e2ddedddc522eafe87088a..72bb8f6e0611cc306aef016f42fe62e847ad1847 100644 (file)
@@ -117,7 +117,7 @@ AP_DECLARE(apr_status_t) ap_parse_mutex(const char *arg, apr_pool_t *pool,
      * are looking to use
      */
     if (file) {
-        *mutexfile = ap_server_root_relative(pool, file);
+        *mutexfile = ap_runtime_dir_relative(pool, file);
         if (!*mutexfile) {
             return APR_BADARG;
         }
@@ -304,7 +304,7 @@ static const char *get_mutex_filename(apr_pool_t *p, mutex_cfg_t *mxcfg,
     }
 #endif
 
-    return ap_server_root_relative(p,
+    return ap_runtime_dir_relative(p,
                                    apr_pstrcat(p,
                                                mxcfg->dir,
                                                "/",
@@ -552,7 +552,7 @@ AP_CORE_DECLARE(void) ap_dump_mutexes(apr_pool_t *p, server_rec *s, apr_file_t *
         }
 
         if (mxcfg->dir)
-            dir = ap_server_root_relative(p, mxcfg->dir);
+            dir = ap_runtime_dir_relative(p, mxcfg->dir);
 
         apr_file_printf(out, "Mutex %s: dir=\"%s\" mechanism=%s %s\n", name, dir, mech,
                         mxcfg->omit_pid ? "[OmitPid]" : "");