Permalink
Browse files

core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the

scoreboard (ScoreBoardFile).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369477 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 4bd298e commit b721875c2a716c7d359ab9211d87814bc2b15322 @trawick trawick committed Aug 4, 2012
Showing with 13 additions and 7 deletions.
  1. +4 −2 CHANGES
  2. +5 −1 docs/manual/mod/mpm_common.xml
  3. +1 −1 include/scoreboard.h
  4. +1 −1 server/core.c
  5. +2 −2 server/scoreboard.c
View
@@ -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]
@@ -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
@@ -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 ---
View
@@ -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);
View
@@ -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);
}

0 comments on commit b721875

Please sign in to comment.