apr_random_after_fork(&proc);
}
+static void core_optional_fn_retrieve(void)
+{
+ ap_init_scoreboard(NULL);
+}
+
AP_CORE_DECLARE(void) ap_random_parent_after_fork(void)
{
/*
APR_HOOK_REALLY_LAST);
ap_hook_dirwalk_stat(core_dirwalk_stat, NULL, NULL, APR_HOOK_REALLY_LAST);
ap_hook_open_htaccess(ap_open_htaccess, NULL, NULL, APR_HOOK_REALLY_LAST);
+ ap_hook_optional_fn_retrieve(core_optional_fn_retrieve, NULL, NULL,
+ APR_HOOK_MIDDLE);
/* register the core's insert_filter hook and register core-provided
* filters
scoreboard_size += sizeof(process_score) * server_limit;
scoreboard_size += sizeof(worker_score) * server_limit * thread_limit;
- pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
-
return scoreboard_size;
}
char *more_storage;
int i;
+ pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
+ if (!shared_score) {
+ return;
+ }
+
ap_calc_scoreboard_size();
ap_scoreboard_image =
ap_calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score *));
apr_status_t rv;
#endif
- pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
-
if (ap_scoreboard_image) {
ap_scoreboard_image->global->restart_time = apr_time_now();
memset(ap_scoreboard_image->parent, 0,