+#ifdef STANDARD20_MODULE_STUFF
+static int
+waklog_init_handler(apr_pool_t *p, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s)
+{
+ int rv;
+ extern char *version;
+ apr_proc_t *proc;
+ waklog_host_config *cfg;
+ void *data;
+
+ getModConfig(cfg, s);
+
+ /* initialize_module() will be called twice, and if it's a DSO
+ * then all static data from the first call will be lost. Only
+ * set up our static data on the second call.
+ * see http://issues.apache.org/bugzilla/show_bug.cgi?id=37519 */
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
+
+ if (!data) {
+ apr_pool_userdata_set((const void *)1, userdata_key,
+ apr_pool_cleanup_null, s->process->pool);
+ } else {
+ log_error( APLOG_MARK, APLOG_INFO, 0, s,
+ "mod_waklog: version %s initialized.", version );
+
+ proc = (apr_proc_t *)ap_pcalloc( s->process->pool, sizeof(apr_proc_t));
+
+ rv = apr_proc_fork(proc, s->process->pool);
+
+ if (rv == APR_INCHILD) {
+ waklog_child_routine(s, NULL);
+ } else {
+ apr_pool_note_subprocess(s->process->pool, proc, APR_KILL_ALWAYS);
+ }
+ /* parent and child */
+ cfg->forked = proc->pid;
+ }
+ return 0;
+}
+#else