summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--include/mpm_common.h1
-rw-r--r--server/mpm/experimental/perchild/perchild.c4
-rw-r--r--server/mpm/mpmt_os2/mpmt_os2.c5
-rw-r--r--server/mpm/netware/mpm_netware.c5
-rw-r--r--server/mpm/perchild/perchild.c4
-rw-r--r--server/mpm/prefork/prefork.c4
-rw-r--r--server/mpm/worker/worker.c4
-rw-r--r--server/mpm_common.c37
9 files changed, 50 insertions, 17 deletions
diff --git a/CHANGES b/CHANGES
index 28ae56f611..f6214bd822 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
Changes with Apache 2.0.34-dev
+ *) Be more vocal about what AcceptMutex values we allow, to make
+ us closer to how 1.3 does it. [Jim Jagielski]
+
*) Get nph- CGI scripts working again. PRs 8902, 8907, 9983
[Jeff Trawick]
diff --git a/include/mpm_common.h b/include/mpm_common.h
index 733d541f37..6784328fb2 100644
--- a/include/mpm_common.h
+++ b/include/mpm_common.h
@@ -259,6 +259,7 @@ const char *ap_mpm_set_lockfile(cmd_parms *cmd, void *dummy,
*/
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
extern apr_lockmech_e ap_accept_lock_mech;
+const char *ap_mpm_show_accept_lock_mech(void);
const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy,
const char *arg);
#endif
diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c
index 2216b914c7..7e031c4a43 100644
--- a/server/mpm/experimental/perchild/perchild.c
+++ b/server/mpm/experimental/perchild/perchild.c
@@ -1341,6 +1341,10 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
restart_pending = shutdown_pending = 0;
server_main_loop(remaining_children_to_start);
diff --git a/server/mpm/mpmt_os2/mpmt_os2.c b/server/mpm/mpmt_os2/mpmt_os2.c
index 424d36066a..c1204b65a3 100644
--- a/server/mpm/mpmt_os2/mpmt_os2.c
+++ b/server/mpm/mpmt_os2/mpmt_os2.c
@@ -313,7 +313,10 @@ static char master_main()
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
-
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
if (one_process) {
ap_scoreboard_image->parent[0].pid = getpid();
ap_mpm_child_main(pconf);
diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c
index 84211461d3..952880b5dc 100644
--- a/server/mpm/netware/mpm_netware.c
+++ b/server/mpm/netware/mpm_netware.c
@@ -917,7 +917,10 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
-
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
show_server_data();
while (!restart_pending && !shutdown_pending) {
diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c
index 2216b914c7..7e031c4a43 100644
--- a/server/mpm/perchild/perchild.c
+++ b/server/mpm/perchild/perchild.c
@@ -1341,6 +1341,10 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
restart_pending = shutdown_pending = 0;
server_main_loop(remaining_children_to_start);
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 8a3f23c9a2..3dc6008124 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -1026,6 +1026,10 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
restart_pending = shutdown_pending = 0;
while (!restart_pending && !shutdown_pending) {
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c
index e5a0f15936..f6594e5056 100644
--- a/server/mpm/worker/worker.c
+++ b/server/mpm/worker/worker.c
@@ -1550,6 +1550,10 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_get_server_version());
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
"Server built: %s", ap_get_server_built());
+#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
+ "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+#endif
restart_pending = shutdown_pending = 0;
server_main_loop(remaining_children_to_start);
diff --git a/server/mpm_common.c b/server/mpm_common.c
index 66a1d25a0b..1053f0bb7a 100644
--- a/server/mpm_common.c
+++ b/server/mpm_common.c
@@ -662,6 +662,25 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
apr_lockmech_e ap_accept_lock_mech = APR_LOCK_DEFAULT;
+AP_DECLARE(const char *) ap_mpm_show_accept_lock_mech(void)
+{
+
+ return ("Valid accept mutexes for this platform and MPM are: default"
+#if APR_HAS_FLOCK_SERIALIZE
+ ", flock"
+#endif
+#if APR_HAS_FCNTL_SERIALIZE
+ ", fcntl"
+#endif
+#if APR_HAS_SYSVSEM_SERIALIZE && !defined(PERCHILD_MPM)
+ ", sysvsem"
+#endif
+#if APR_HAS_PROC_PTHREAD_SERIALIZE
+ ", pthread"
+#endif
+ ".");
+}
+
AP_DECLARE(const char *) ap_mpm_set_accept_lock_mech(cmd_parms *cmd,
void *dummy,
const char *arg)
@@ -701,22 +720,10 @@ AP_DECLARE(const char *) ap_mpm_set_accept_lock_mech(cmd_parms *cmd,
}
#endif
else {
- return apr_pstrcat(cmd->pool, arg, " is an invalid mutex mechanism; "
- "valid ones for this platform and MPM are: default"
-#if APR_HAS_FLOCK_SERIALIZE
- ", flock"
-#endif
-#if APR_HAS_FCNTL_SERIALIZE
- ", fcntl"
-#endif
-#if APR_HAS_SYSVSEM_SERIALIZE && !defined(PERCHILD_MPM)
- ", sysvsem"
-#endif
-#if APR_HAS_PROC_PTHREAD_SERIALIZE
- ", pthread"
-#endif
- , NULL);
+ return apr_pstrcat(cmd->pool, arg, " is an invalid mutex mechanism; ",
+ ap_mpm_show_accept_lock_mech(), NULL);
}
return NULL;
}
+
#endif