Possible patch would be moving the "start" handling from post config to
pre config. That way everything gets easier (we are not establishing
listeners and shut them down again shortly after, not establishing
rotatelogs etc.).

Patch against 2.2 head at
http://people.apache.org/~rjung/patches/httpd-service-start.patch or here:

Index: mpm_winnt.c
===================================================================
--- mpm_winnt.c (Revision 797857)
+++ mpm_winnt.c (Arbeitskopie)
@@ -1452,6 +1452,13 @@

     apr_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));

+    if (!strcasecmp(signal_arg, "start")) {
+        apr_status_t rv = 0;
+        rv = mpm_service_start(ptemp, inst_argc, inst_argv);
+        apr_terminate();
+        exit (rv);
+    }
+
     return OK;
 }

@@ -1494,20 +1501,6 @@
         exit(0);
     }

-    if (!strcasecmp(signal_arg, "start")) {
-        ap_listen_rec *lr;
-
-        /* Close the listening sockets. */
-        for (lr = ap_listeners; lr; lr = lr->next) {
-            apr_socket_close(lr->sd);
-            lr->active = 0;
-        }
-        rv = mpm_service_start(ptemp, inst_argc, inst_argv);
-        apr_pool_destroy(s->process->pool);
-        apr_terminate();
-        exit (rv);
-    }
-
     if (!strcasecmp(signal_arg, "restart")) {
         mpm_signal_service(ptemp, 1);
         apr_pool_destroy(s->process->pool);

Reply via email to