]> granicus.if.org Git - apache/commitdiff
core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the
authorJeff Trawick <trawick@apache.org>
Sat, 4 Aug 2012 21:40:08 +0000 (21:40 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 4 Aug 2012 21:40:08 +0000 (21:40 +0000)
scoreboard (ScoreBoardFile).

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

CHANGES
docs/manual/mod/mpm_common.xml
include/scoreboard.h
server/core.c
server/scoreboard.c

diff --git a/CHANGES b/CHANGES
index c2dcf95148ec64a02919eb4a0234f5ea65bdd1c5..7b60afc4ded06904bcf1070f7e1b94b6b8a4721d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,8 +14,10 @@ Changes with Apache 2.5.0
   *) mod_lua: Move LUA_COMPAT_ALL into the right place, so it will
      activate compatibility mode for Lua 5.2. [Daniel Gruno]
 
-  *) mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
-     DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.  [Jeff Trawick]
+  *) core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the
+     scoreboard (ScoreBoardFile).  mod_lbmethod_heartbeat, mod_heartmonitor:
+     Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the heartbeat
+     storage file.  [Jeff Trawick]
 
   *) mod_ssl: Add RFC 5878 support. [Ben Laurie]
 
index 2ddbc8ebbd45f6b441ad987bde787497b5aee45b..197754ee6c54592128d9a57c2d904f46a545086e 100644 (file)
@@ -456,7 +456,7 @@ spikes</description>
 <description>Location of the file used to store coordination data for
 the child processes</description>
 <syntax>ScoreBoardFile <var>file-path</var></syntax>
-<default>ScoreBoardFile logs/apache_runtime_status</default>
+<default>ScoreBoardFile apache_runtime_status</default>
 <contextlist><context>server config</context></contextlist>
 <modulelist><module>event</module><module>mpm_winnt</module>
 <module>prefork</module><module>worker</module></modulelist>
@@ -470,6 +470,10 @@ the child processes</description>
     disk (using file-based shared memory). Specifying this directive causes
     Apache httpd to always create the file on the disk.</p>
 
+    <p>If <var>file-path</var> is not an absolute path, the location specified
+    will be relative to the value of 
+    <directive module="core">DefaultRuntimeDir</directive>.</p>
+
     <example><title>Example</title>
     <highlight language="config">
       ScoreBoardFile /var/run/apache_runtime_status
index 2fd2960e4995073fa2be1aa5db9ec67faa1cf977..393cbe9f2999c560c7afc8cd29f4e38bde6ba896 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
 
 /* Scoreboard file, if there is one */
 #ifndef DEFAULT_SCOREBOARD
-#define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
+#define DEFAULT_SCOREBOARD "apache_runtime_status" /* within DEFAULT_REL_RUNTIMEDIR */
 #endif
 
 /* Scoreboard info on a process is, for now, kept very brief ---
index 03137577de2a167fe73e81a61c0b38a983121c9c..5d0e12d668352f97d07eb15443f0f84e8dd7e161 100644 (file)
@@ -4799,7 +4799,7 @@ static void core_dump_config(apr_pool_t *p, server_rec *s)
         tmp = s->error_fname;
     apr_file_printf(out, "Main ErrorLog: \"%s\"\n", tmp);
     if (ap_scoreboard_fname) {
-        tmp = ap_server_root_relative(p, ap_scoreboard_fname);
+        tmp = ap_runtime_dir_relative(p, ap_scoreboard_fname);
         apr_file_printf(out, "ScoreBoardFile: \"%s\"\n", tmp);
     }
     ap_dump_mutexes(p, s, out);
index bef2b90908a98d250483b2437704560b6c583d2f..67b0386c4b93143ade5f2d8e26139f34e1df9825 100644 (file)
@@ -217,7 +217,7 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
     /* The config says to create a name-based shmem */
     if (ap_scoreboard_fname) {
         /* make sure it's an absolute pathname */
-        fname = ap_server_root_relative(pconf, ap_scoreboard_fname);
+        fname = ap_runtime_dir_relative(pconf, ap_scoreboard_fname);
         if (!fname) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EBADPATH, ap_server_conf, APLOGNO(00003)
                          "Fatal error: Invalid Scoreboard path %s",
@@ -239,7 +239,7 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
         else if (rv == APR_ENOTIMPL) {
             /* Make sure it's an absolute pathname */
             ap_scoreboard_fname = DEFAULT_SCOREBOARD;
-            fname = ap_server_root_relative(pconf, ap_scoreboard_fname);
+            fname = ap_runtime_dir_relative(pconf, ap_scoreboard_fname);
 
             return create_namebased_scoreboard(global_pool, fname);
         }