httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: [PATCH] fix comments in the MPMs
Date Thu, 30 Aug 2001 02:21:23 GMT
On Wed, Aug 29, 2001 at 05:44:27PM -0700, Aaron Bannert wrote:
> I posted this before, but I think Justin distracted everyone by saying
> that he still wanted -X funtionality. That's all fine and dandy, but the
> comments are just plain wrong today, so this patch fixes them.
> 
> (Hmmm, I wonder if it's still like this in worker too...)

I totally forgot about this patch since I got commit access.  Thanks 
for reminding me.  =-)  (In my defense, I posted a patch to add -X
back in - not my fault no one committed it...)

For those that weren't around the last time we discussed this, a 
pointer to the archive...

My patch to add -X back:

http://www.apachelabs.org/apache-mbox/200106.mbox/%3c20010621082241.D19356@ebuilt.com%3e

Amazingly, the patch still applies today without any errors.  I've 
included a "fresh" patch below.

Also posted was a "compromise" to give a warning about -X:

http://www.apachelabs.org/apache-mbox/200106.mbox/%3c87u2186425.fsf@apache.org%3e

To recap votes from the last time:

Ryan said -0.9 (non-veto)
Dean and Roy said +1.

With my vote which now counts, we have three +1s and a non-veto.
I'll wait until tomorrow night to commit unless rbb changes to a
veto or someone else vetoes.  I've said all I have to say on this
in the last thread.  -- justin

Index: include/http_main.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/http_main.h,v
retrieving revision 1.19
diff -u -r1.19 http_main.h
--- include/http_main.h	2001/02/16 04:26:31	1.19
+++ include/http_main.h	2001/08/30 02:12:45
@@ -63,7 +63,7 @@
  * in apr_getopt() format.  Use this for default'ing args that the MPM
  * can safely ignore and pass on from its rewrite_args() handler.
  */
-#define AP_SERVER_BASEARGS "C:c:D:d:f:vVlLth?"
+#define AP_SERVER_BASEARGS "C:c:D:d:f:vVlLth?X"
 
 #ifdef __cplusplus
 extern "C" {
Index: server/main.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/main.c,v
retrieving revision 1.99
diff -u -r1.99 main.c
--- server/main.c	2001/05/22 01:31:11	1.99
+++ server/main.c	2001/08/30 02:12:45
@@ -344,6 +344,10 @@
 	    new = (char **)apr_array_push(ap_server_config_defines);
 	    *new = apr_pstrdup(pcommands, optarg);
 	    break;
+	case 'X':
+	    new = (char **)apr_array_push(ap_server_config_defines);
+	    *new = "DEBUG";
+	    break;
 	case 'f':
 	    confname = optarg;
 	    break;
Index: server/mpm/beos/beos.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
retrieving revision 1.60
diff -u -r1.60 beos.c
--- server/mpm/beos/beos.c	2001/08/15 21:11:58	1.60
+++ server/mpm/beos/beos.c	2001/08/30 02:12:45
@@ -944,10 +944,17 @@
 static void beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 {
     static int restart_num = 0;
-    int no_detach = 0;
+    int no_detach = 0, debug;
 
-    one_process = !!ap_exists_config_define("ONE_PROCESS");
-    no_detach = !!ap_exists_config_define("NO_DETACH");
+    debug = ap_exists_config_define("DEBUG");
+
+    if (debug)
+        no_detach = one_process = 1;
+    else
+    {
+        one_process = ap_exists_config_define("ONE_PROCESS");
+        no_detach = ap_exists_config_define("NO_DETACH");
+    }
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
Index: server/mpm/perchild/perchild.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
retrieving revision 1.76
diff -u -r1.76 perchild.c
--- server/mpm/perchild/perchild.c	2001/08/30 00:55:50	1.76
+++ server/mpm/perchild/perchild.c	2001/08/30 02:12:45
@@ -1326,11 +1326,18 @@
 static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
 {
     static int restart_num = 0;
-    int no_detach = 0;
+    int no_detach = 0, debug;
     int i;
 
-    one_process = !!ap_exists_config_define("ONE_PROCESS");
-    no_detach = !!ap_exists_config_define("NO_DETACH");
+    debug = ap_exists_config_define("DEBUG");
+
+    if (debug)
+        no_detach = one_process = 1;
+    else
+    {
+        one_process = ap_exists_config_define("ONE_PROCESS");
+        no_detach = ap_exists_config_define("NO_DETACH");
+    }
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
Index: server/mpm/prefork/prefork.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.199
diff -u -r1.199 prefork.c
--- server/mpm/prefork/prefork.c	2001/08/30 00:55:50	1.199
+++ server/mpm/prefork/prefork.c	2001/08/30 02:12:46
@@ -1319,10 +1319,17 @@
 static void prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
 {
     static int restart_num = 0;
-    int no_detach = 0;
+    int no_detach = 0, debug;
 
-    no_detach = !!ap_exists_config_define("NO_DETACH");
-    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    debug = ap_exists_config_define("DEBUG");
+
+    if (debug)
+        no_detach = one_process = 1;
+    else
+    {
+        no_detach = ap_exists_config_define("NO_DETACH");
+        one_process = ap_exists_config_define("ONE_PROCESS");
+    }
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
Index: server/mpm/spmt_os2/spmt_os2.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
retrieving revision 1.102
diff -u -r1.102 spmt_os2.c
--- server/mpm/spmt_os2/spmt_os2.c	2001/08/30 00:55:50	1.102
+++ server/mpm/spmt_os2/spmt_os2.c	2001/08/30 02:12:46
@@ -1151,7 +1151,8 @@
 
 static void spmt_os2_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 {
-    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    one_process = ap_exists_config_define("ONE_PROCESS") ||
+                  ap_exists_config_define("DEBUG");
 
     is_graceful = 0;
     ap_listen_pre_config();
Index: server/mpm/threaded/threaded.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
retrieving revision 1.62
diff -u -r1.62 threaded.c
--- server/mpm/threaded/threaded.c	2001/08/30 00:55:51	1.62
+++ server/mpm/threaded/threaded.c	2001/08/30 02:12:46
@@ -1360,10 +1360,17 @@
 static void threaded_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 {
     static int restart_num = 0;
-    int no_detach = 0;
+    int no_detach = 0, debug;
 
-    one_process = !!ap_exists_config_define("ONE_PROCESS");
-    no_detach = !!ap_exists_config_define("NO_DETACH");
+    debug = ap_exists_config_define("DEBUG");
+
+    if (debug)
+        no_detach = one_process = 1;
+    else
+    {
+        no_detach = ap_exists_config_define("NO_DETACH");
+        one_process = ap_exists_config_define("ONE_PROCESS");
+    }
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
Index: server/mpm/winnt/mpm_winnt.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.177
diff -u -r1.177 mpm_winnt.c
--- server/mpm/winnt/mpm_winnt.c	2001/08/23 19:29:45	1.177
+++ server/mpm/winnt/mpm_winnt.c	2001/08/30 02:12:46
@@ -1835,7 +1835,8 @@
      */
     apr_status_t rv;
 
-    if (ap_exists_config_define("ONE_PROCESS"))
+    if (ap_exists_config_define("ONE_PROCESS") ||
+        ap_exists_config_define("DEBUG"))
         one_process = -1;
 
     if (!strcasecmp(signal_arg, "runservice")


Mime
View raw message