]> granicus.if.org Git - apache/commitdiff
Do only on 2nd pass
authorJim Jagielski <jim@apache.org>
Wed, 30 Sep 2015 16:59:23 +0000 (16:59 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 30 Sep 2015 16:59:23 +0000 (16:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706083 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/motorz/motorz.c

index 4f4926a3bc354719ccea3479955220c457556816..cf51f16ce0423302e39668902c3b86faf724d2be 100644 (file)
@@ -893,9 +893,10 @@ static void child_main(motorz_core_t *mz, int child_num_arg, int child_bucket)
 
     (void) ap_update_child_status(sbh, SERVER_READY, (request_rec *) NULL);
 
+#if 0
     apr_skiplist_init(&mz->timer_ring, mz->pool);
     apr_skiplist_set_compare(mz->timer_ring, timer_comp, timer_comp);
-
+#endif
     status = motorz_setup_workers(mz);
     if (status != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, status, ap_server_conf, APLOGNO(02868)
@@ -1598,19 +1599,19 @@ static int motorz_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
         }
+        apr_pool_create(&mz->pool, ap_pglobal);
+        apr_pool_tag(mz->pool, "motorz-mpm-core");
+        apr_skiplist_init(&mz->timer_ring, mz->pool);
+        apr_skiplist_set_compare(mz->timer_ring, timer_comp, timer_comp);
+        rv = apr_thread_mutex_create(&mz->mtx, 0, mz->pool);
+        if (rv != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO()
+                         "motorz_pre_config: apr_thread_mutex_create failed");
+            return rv;
+        }
     }
 
     parent_pid = ap_my_pid = getpid();
-    apr_pool_create(&mz->pool, ap_pglobal);
-    apr_pool_tag(mz->pool, "motorz-mpm-core");
-    apr_skiplist_init(&mz->timer_ring, mz->pool);
-    apr_skiplist_set_compare(mz->timer_ring, timer_comp, timer_comp);
-    rv = apr_thread_mutex_create(&mz->mtx, 0, mz->pool);
-    if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO()
-                     "motorz_pre_config: apr_thread_mutex_create failed");
-        return rv;
-    }
 
     ap_listen_pre_config();
     ap_num_kids = DEFAULT_START_DAEMON;