]> granicus.if.org Git - apache/commitdiff
Bring 2.0 up to parity, a bit, with how much info we provide to
authorJim Jagielski <jim@apache.org>
Wed, 20 Mar 2002 16:44:13 +0000 (16:44 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 20 Mar 2002 16:44:13 +0000 (16:44 +0000)
the admin regarding valid values for AcceptMutex. Should also
tell 'em what "default" actually maps to, but that can wait.

PR:
Obtained from:
Submitted by:
Reviewed by:

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

CHANGES
include/mpm_common.h
server/mpm/experimental/perchild/perchild.c
server/mpm/mpmt_os2/mpmt_os2.c
server/mpm/netware/mpm_netware.c
server/mpm/perchild/perchild.c
server/mpm/prefork/prefork.c
server/mpm/worker/worker.c
server/mpm_common.c

diff --git a/CHANGES b/CHANGES
index 28ae56f61127a5e0e26491b877f24bf521e4f4c3..f6214bd822182c82002653c915c688a25ea2db1d 100644 (file)
--- 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]
 
index 733d541f371939a3f8f0588d172e8a5c002a3715..6784328fb2af0d874a6b833d2573702e0b696ac7 100644 (file)
@@ -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
index 2216b914c7cc6c48e7ba348d20cbe7cbd8deb392..7e031c4a43c990a937ebcdc9f772d23a22c5cc0e 100644 (file)
@@ -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);
index 424d36066aa55f1b21012246da99befa086a796b..c1204b65a3bc444bd290f2cdbbe607b1a9421200 100644 (file)
@@ -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);
index 84211461d367524c155f7a64ba9174b3ea588845..952880b5dc3dd9614f340807c167cf1d928cf089 100644 (file)
@@ -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) {
index 2216b914c7cc6c48e7ba348d20cbe7cbd8deb392..7e031c4a43c990a937ebcdc9f772d23a22c5cc0e 100644 (file)
@@ -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);
index 8a3f23c9a24592a678152599655968ccf7cfe997..3dc600812488f9024d3d9cb5ab7bd758775cb489 100644 (file)
@@ -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) {
index e5a0f15936d8dc4ac00f80f6fd71d449978e5ef9..f6594e505651280a388fcfee427f10156dabcf0a 100644 (file)
@@ -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);
index 66a1d25a0b4e7d59b5933fe63e529ec11b0f63c0..1053f0bb7a261e1f1dd5604b44872166837af071 100644 (file)
@@ -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