BTW, an even simpler patch could be:

Index: modules/proxy/mod_proxy_balancer.c
===================================================================
--- modules/proxy/mod_proxy_balancer.c    (revision 1831396)
+++ modules/proxy/mod_proxy_balancer.c    (working copy)
@@ -1886,25 +1886,12 @@ static void balancer_child_init(apr_pool_t *p, ser
         apr_status_t rv;

         if (conf->balancers->nelts) {
-            apr_size_t size;
-            unsigned int num;
-            /* In 2.4.x we rely on the provider to return either the same
-             * in/out &bslot, a valid new one, or NULL for failure/exit().
-             * TODO? for 2.6+/3.x we possibly could consider returned status
-             * to be real failures, but e.g. NOTFOUND/ENOSHM* to continue with
-             * existing conf->bslot (even when the returned one is NULL).
-             * Hence handle the slotmem reuse it here where we know it's valid
-             * both for fork()ed post_config()s and MPM winnt-like ones (run in
-             * child process too). The provider tells what it attached or not,
-             * and if not whether the child should stop (fatal) or continue
-             * with the "inherited" configuration.
+            /* The slotmem can't be NULL here with any MPM, initialized in
+             * post_config() it's either fork()ed on unixes MPMs, or directly
+             * available for fully threaded MPMs and winnt where post_config()
+             * is called in children processes too.
              */
-            rv = storage->attach(&conf->bslot, conf->id, &size, &num, p);
-            if (!conf->bslot) {
-                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
APLOGNO(01205) "slotmem_attach failed");
-                exit(1); /* Ugly, but what else? */
-            }
-            (void)rv;
+            ap_assert(conf->bslot != NULL);
         }

         balancer = (proxy_balancer *)conf->balancers->elts;
_

since mod_proxy_balancer uses slotmem_shm only, attach() is not needed.

Reply via email to