You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/06/21 17:22:41 UTC

[PATCH] Add back -X functionality

This attempts to add the -X functionality back into Apache 2.0.
I chose the simplest way of implementing this - have -X define a config
symbol called DEBUG (and you could use -DDEBUG as well).  If the MPMs 
detect this symbol, it should do whatever is necessary for DEBUG mode 
(which isn't necessarily ONE_PROCESS).  ONE_PROCESS and NO_DETACH are 
still available.

This patch also removes the !! in the ap_exists_config_define calls 
as I can't fathom what that is good for.

Comments and suggestions welcomed.  -- justin

Index: include/http_main.h
===================================================================
RCS file: /home/cvspublic/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/06/20 16:28:03
@@ -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/cvspublic/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/06/20 16:28:05
@@ -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/cvspublic/httpd-2.0/server/mpm/beos/beos.c,v
retrieving revision 1.52
diff -u -r1.52 beos.c
--- server/mpm/beos/beos.c	2001/05/07 18:41:36	1.52
+++ server/mpm/beos/beos.c	2001/06/20 16:28:09
@@ -896,10 +896,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/cvspublic/httpd-2.0/server/mpm/perchild/perchild.c,v
retrieving revision 1.67
diff -u -r1.67 perchild.c
--- server/mpm/perchild/perchild.c	2001/06/12 14:04:12	1.67
+++ server/mpm/perchild/perchild.c	2001/06/20 16:28:11
@@ -1309,11 +1309,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/cvspublic/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.185
diff -u -r1.185 prefork.c
--- server/mpm/prefork/prefork.c	2001/06/14 15:46:44	1.185
+++ server/mpm/prefork/prefork.c	2001/06/20 16:28:13
@@ -1291,10 +1291,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/cvspublic/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
retrieving revision 1.95
diff -u -r1.95 spmt_os2.c
--- server/mpm/spmt_os2/spmt_os2.c	2001/05/20 07:28:59	1.95
+++ server/mpm/spmt_os2/spmt_os2.c	2001/06/20 16:28:15
@@ -1136,7 +1136,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/cvspublic/httpd-2.0/server/mpm/threaded/threaded.c,v
retrieving revision 1.35
diff -u -r1.35 threaded.c
--- server/mpm/threaded/threaded.c	2001/06/15 18:33:09	1.35
+++ server/mpm/threaded/threaded.c	2001/06/20 16:28:16
@@ -1226,10 +1226,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/cvspublic/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.159
diff -u -r1.159 mpm_winnt.c
--- server/mpm/winnt/mpm_winnt.c	2001/06/18 19:09:55	1.159
+++ server/mpm/winnt/mpm_winnt.c	2001/06/20 16:28:18
@@ -1778,7 +1778,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")


Re: [PATCH] Add back -X functionality

Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
From: "Ben Laurie" <be...@algroup.co.uk>
Sent: Thursday, June 21, 2001 5:39 PM


> Aaron Bannert wrote:
> > p.s. why would "!!" fix bugs on some platforms if ap_exists_config_define
> > can only return 0 or 1? I can only see using !! to normalize some non-bool
> > return to 0/1 for some weird logic, and even then it's not readable.
> 
> As I was responsible for !!, I guess I should explain. The original
> version was flag=!!getenv("SOMETHING").
> 
> I agree it isn't totally readable, and asked permission before including
> it.

True, flag = (getenv("SOMETHING") != NULL) is much clearer.


Re: [PATCH] Add back -X functionality

Posted by Ben Laurie <be...@algroup.co.uk>.
Aaron Bannert wrote:
> p.s. why would "!!" fix bugs on some platforms if ap_exists_config_define
> can only return 0 or 1? I can only see using !! to normalize some non-bool
> return to 0/1 for some weird logic, and even then it's not readable.

As I was responsible for !!, I guess I should explain. The original
version was flag=!!getenv("SOMETHING").

I agree it isn't totally readable, and asked permission before including
it.

Without checking the code it looks to be redundant.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

In Boston 'til 1st July.

Re: [PATCH] Add back -X functionality

Posted by Aaron Bannert <aa...@ebuilt.com>.
On Thu, Jun 21, 2001 at 08:51:47AM -0700, rbb@covalent.net wrote:
> On Thu, 21 Jun 2001, Justin Erenkrantz wrote:
> 
> > This attempts to add the -X functionality back into Apache 2.0.
> > I chose the simplest way of implementing this - have -X define a config
> > symbol called DEBUG (and you could use -DDEBUG as well).  If the MPMs
> > detect this symbol, it should do whatever is necessary for DEBUG mode
> > (which isn't necessarily ONE_PROCESS).  ONE_PROCESS and NO_DETACH are
> > still available.
> >
> > This patch also removes the !! in the ap_exists_config_define calls
> > as I can't fathom what that is good for.
> >
> > Comments and suggestions welcomed.  -- justin
> 
> As I said when this was originally discussed, I really dislike this.  -X
> is the exact same as -DONE_PROCESS.  We now have two ways to get into the
> same state.  Yuck!  We made a conscious decision to go with -DONE_PROCESS,
> the original goal being to move towards environment variables instead of
> command line arguments.  The !! was there by the way, because it solved a
> lot of bugs on many platforms.

*eeww* There really was a group movement toward environment variables?
Could you perhaps point me to this thread?

(Env vars are bad, IMHO. It's not fun to debug an application for hours
only to find out that the unexplained behavior was caused by some
obscure/undocumented env var)


p.s. why would "!!" fix bugs on some platforms if ap_exists_config_define
can only return 0 or 1? I can only see using !! to normalize some non-bool
return to 0/1 for some weird logic, and even then it's not readable.


> In all, I am -0.9 for this patch, I won't veto it, but I don't want to see
> it in the code.  If we do put the -X back in, then remove -DONE_PROCESS.
> Having both is just bogus.

-aaron


Re: [PATCH] Add back -X functionality

Posted by "David N. Welton" <da...@apache.org>.
Oops... bad patch.  This one is nicer:

--- include/http_main.h	2001/02/16 04:26:31	1.19
+++ include/http_main.h	2001/06/22 13:11:12
@@ -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:vVXlLth?"
 
 #ifdef __cplusplus
 extern "C" {
--- server/main.c	2001/05/22 01:31:11	1.99
+++ server/main.c	2001/06/22 13:11:27
@@ -280,6 +280,13 @@
     destroy_and_exit_process(process, 1);
 }
 
+void no_X_warning(process_rec *process)
+{
+    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "The -X option is deprecated - use -DONE_PROCESS instead.");
+    destroy_and_exit_process(process, 1);
+}
+
+
 int main(int argc, const char * const argv[])
 {
     char c;
@@ -354,6 +361,8 @@
 	case 'V':
 	    show_compile_settings();
 	    destroy_and_exit_process(process, 0);
+	case 'X':
+	    no_X_warning(process);
 	case 'l':
 	    ap_show_modules();
 	    destroy_and_exit_process(process, 0);

Anyway, though, the idea isn't that complex.  I think it would help
achieve the goal of not having people pester Ryan about where -X got
to.

-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

Re: [PATCH] Add back -X functionality

Posted by "David N. Welton" <da...@apache.org>.
<rb...@covalent.net> writes:

> Yes, maybe -X should issue a warning, maybe we should change the
> name of the definition.  In the end, I just don't want to have this
> conversation for the fourth or fifth time.

Plop:

Index: server/main.c
===================================================================
RCS file: /home/cvspublic/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/06/21 17:42:17
@@ -280,6 +280,13 @@
     destroy_and_exit_process(process, 1);
 }
 
+void no_X_warning(process_rec *process)
+{
+    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "  -X                : deprecated - used -DONE_PROCESS instead");
+    destroy_and_exit_process(process, 1);
+}
+
+
 int main(int argc, const char * const argv[])
 {
     char c;
@@ -354,6 +361,8 @@
 	case 'V':
 	    show_compile_settings();
 	    destroy_and_exit_process(process, 0);
+	case 'X':
+	    no_X_warning(process);
 	case 'l':
 	    ap_show_modules();
 	    destroy_and_exit_process(process, 0);

-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

Re: [PATCH] Add back -X functionality

Posted by rb...@covalent.net.
> > As I said when this was originally discussed, I really dislike this.  -X
> > is the exact same as -DONE_PROCESS.  We now have two ways to get into the
> > same state.  Yuck!  We made a conscious decision to go with -DONE_PROCESS,
> > the original goal being to move towards environment variables instead of
> > command line arguments.  The !! was there by the way, because it solved a
> > lot of bugs on many platforms.
>
> No, I don't see -X as the same as -DONE_PROCESS.  -X says, "Whatever
> you have to do across the entire system to achieve a debug state, do
> it."  -DONE_PROCESS says, "Tell your MPM to only have one process."
> Very different things.  I think ONE_PROCESS has too narrow of a scope.

These are not two different things until you show me an MPM that does
two different things when it sees -X and -DONE_PROCESS.  Until that time,
saying that -X and -DONE_PROCESS are different is just hand-waving.

> Yes, they *might* achieve the same result, but that isn't a big deal
> (IMHO).  What if a module wants to achieve some type of internal
> debugging check or special behavior at run-time (plausible?), it can
> check for the existance of the DEBUG directive?  Checking ONE_PROCESS
> in a module doesn't make any semantic sense.

I just took an even closer look at the patch based on this comment.  Yuck!
Why are we having a command line option push a value onto our array of
command line definitions?

The name ONE_PROCESS may be wrong, but it has been like that since the
very beginning of Apache 2.0 development.  It has been documented that
this is the way to start the server in the old -X mode.  Yes, maybe -X
should issue a warning, maybe we should change the name of the definition.
In the end, I just don't want to have this conversation for the fourth or
fifth time.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Re: [PATCH] Add back -X functionality

Posted by Bill Stoddard <bi...@wstoddard.com>.
+1

> I don't
> think the issue would come up so often if people could easily figure out
> how to get into the -X style debugging mode.  It's only when you can't
> figure it out and can't find the information on how to do it that you get
> frustrated and bring up the issue on the list.  Can we either have -X
> return a hint and then exit() or let a help screen do the trick?  Or
> something?  I'm not as attached to -X doing the deed as I am to being able
> to quickly figure out that -DONE_PROCESS is what you should use.
> 
> <shrug>
> 
> --Cliff
> 
> 
> 
> --------------------------------------------------------------
>    Cliff Woolley
>    cliffwoolley@yahoo.com
>    Charlottesville, VA
> 
> 


Re: [PATCH] Add back -X functionality

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 21 Jun 2001 rbb@covalent.net wrote:

> I should point out, that from looking through my copy of the mail
> archives, this is now the third or fourth time that -X has been brought
> up.  The reason I am against this, is that I brought it up every other
> time, and we always decided against doing the work, or at least the work
> was never done, for one reason or another.  I am sick of re-visiting the
> same issues over and over and over again.  We have had this discussion far
> too often to be changing our minds yet again.

> > (AFAICT, it's not currently documented... may be wrong about that).
>
> It's documented in manual/upgrading.html

That's fine.  Can we at least compromise as has been suggested and put
this issue to rest by documenting it in other places as well?  I don't
think the issue would come up so often if people could easily figure out
how to get into the -X style debugging mode.  It's only when you can't
figure it out and can't find the information on how to do it that you get
frustrated and bring up the issue on the list.  Can we either have -X
return a hint and then exit() or let a help screen do the trick?  Or
something?  I'm not as attached to -X doing the deed as I am to being able
to quickly figure out that -DONE_PROCESS is what you should use.

<shrug>

--Cliff



--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: [PATCH] Add back -X functionality

Posted by rb...@covalent.net.
I should point out, that from looking through my copy of the mail
archives, this is now the third or fourth time that -X has been brought
up.  The reason I am against this, is that I brought it up every other
time, and we always decided against doing the work, or at least the work
was never done, for one reason or another.  I am sick of re-visiting the
same issues over and over and over again.  We have had this discussion far
too often to be changing our minds yet again.

> > The !! was there by the way, because it solved a lot of bugs on many
> > platforms.
>
> I'd wondered about that myself.  I guess doing !! ensures that the value
> is 0 or 1 and not 0 or non-zero?  Whatever.

Basically, yes.  We are ensuring that we have a boolean option.

>
> > In all, I am -0.9 for this patch, I won't veto it, but I don't want to see
> > it in the code.  If we do put the -X back in, then remove -DONE_PROCESS.
> > Having both is just bogus.
>
> That may be, but IMHO it completely violates the principle of least
> astonishment to have -X vaporize.  I wanted to use it one day a month or
> so ago, got an error message that it was an unknown flag [with no hint
> that it'd changed to -DONE_PROCESS] and had to actually go dig into the
> MPM source to figure out how to tell Apache what to go do with itself.
> To me, THAT'S bogus.  At the very least, -X should give a hint that it's
> now -DONE_PROCESS or it should be really well documented somewhere
> (AFAICT, it's not currently documented... may be wrong about that).

It's documented in manual/upgrading.html

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: [PATCH] Add back -X functionality

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Thu, Jun 21, 2001 at 08:51:47AM -0700, rbb@covalent.net wrote:
> As I said when this was originally discussed, I really dislike this.  -X
> is the exact same as -DONE_PROCESS.  We now have two ways to get into the
> same state.  Yuck!  We made a conscious decision to go with -DONE_PROCESS,
> the original goal being to move towards environment variables instead of
> command line arguments.  The !! was there by the way, because it solved a
> lot of bugs on many platforms.

No, I don't see -X as the same as -DONE_PROCESS.  -X says, "Whatever 
you have to do across the entire system to achieve a debug state, do 
it."  -DONE_PROCESS says, "Tell your MPM to only have one process."  
Very different things.  I think ONE_PROCESS has too narrow of a scope.  
Yes, they *might* achieve the same result, but that isn't a big deal 
(IMHO).  What if a module wants to achieve some type of internal
debugging check or special behavior at run-time (plausible?), it can 
check for the existance of the DEBUG directive?  Checking ONE_PROCESS 
in a module doesn't make any semantic sense.

And another point is -X is in most of the printed documentation.  And,
to most casual users, ONE_PROCESS wouldn't imply "debug" mode (which is
how this thread got started).  It needs to be obvious.  -X is the 
precedent that has been set before.  And, they can use -DDEBUG as well.
That seems reasonably sane to me.

About the !!.  The value returned from ap_exists_config_define() 
is either 0 or 1.  And, it is an integer (no bools in C).  All we are 
doing with the values are the standard "is this non-zero" check in
C (if (foo) {...).  C++ would do the !! to convert an int to a bool.  
If we are getting type errors checking for an integer being non-zero, 
we have lots of problems in our code (not to mention our C compilers).

> In all, I am -0.9 for this patch, I won't veto it, but I don't want to see
> it in the code.  If we do put the -X back in, then remove -DONE_PROCESS.
> Having both is just bogus.

I don't have a binding vote on this matter.  I'll let people with
binding votes discuss this.  I personally can see the need for having
BOTH ONE_PROCESS and DEBUG.  They just mean different things.  But, if I
had to choose, DEBUG would win out as it is more versatile.  -- justin


Re: [PATCH] Add back -X functionality

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
> if -X causes DEBUG to be defined and prefork uses that as a hint to do
> ONE_PROCESS, that sounds perfectly fine to me.

Me too.  +1 on the patch.

> and when will unix thread debugging catch up with the 1980s?  i was
> debugging multithreaded programs with ease on OS/2 1.x over a decade ago.
> 
> btw, even though -X exists, i frequently debug apache 1.3 by restricting
> it to a single child process and attaching to that child... because some
> of the -X changes alter the behaviour.

Yep, which is why I was surprised to hear that ONE_PROCESS was causing
NO_DETACH to be set as well -- that doesn't make any sense to me.  There
is nothing more frustrating for me than being in the middle of a "how to
debug apache" class and having to explain these new options.  ONE_PROCESS
should mean only one child process, since that's exactly what a developer
needs to attach to a child before a request is sent.  -X should mean that
we are inside a debugger and need all of the options to make stepping
though a process easy.

....Roy


Re: [PATCH] Add back -X functionality

Posted by dean gaudet <dg...@arctic.org>.
when i did the MPM stuff i didn't want to try to figure out an interface
for the command line arguments from the generic http_main to the MPM.
doing the ONE_PROCESS thing was easy, and put the mpm into the same boat
as the other modules... no access to the command line.

between command lines, config files, registries, the environment, ... it's
pretty insane the number of interfaces you need to define.

at least we've merged the hokey <IfDef> conditionals with the environment
in 2.0 ... we have haven't we?  or is that still yet another variable
space?

if -X causes DEBUG to be defined and prefork uses that as a hint to do
ONE_PROCESS, that sounds perfectly fine to me.

and when will unix thread debugging catch up with the 1980s?  i was
debugging multithreaded programs with ease on OS/2 1.x over a decade ago.

btw, even though -X exists, i frequently debug apache 1.3 by restricting
it to a single child process and attaching to that child... because some
of the -X changes alter the behaviour.

-dean


Re: [PATCH] Add back -X functionality

Posted by "David N. Welton" <da...@apache.org>.
<rb...@covalent.net> writes:

> In all, I am -0.9 for this patch, I won't veto it, but I don't want
> to see it in the code.  If we do put the -X back in, then remove
> -DONE_PROCESS.  Having both is just bogus.

As a compromise, maybe we could have -X (or --help?) tell the user to
use -DONE_PROCESS.  It's kind of ugly, and I suppose it might be
difficult to draw the line on what gets this sort of backwards
compatibility treatment.  OTOH, this was one of the first things I
noticed about 2.0 as well..."how the heck do I do -X?!".

Just a thought...

-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

upgrading docs (was Re: [PATCH] Add back -X functionality)

Posted by jo...@slive.ca.
On Thu, 21 Jun 2001, Cliff Woolley wrote:
> At the very least, -X should give a hint that it's
> now -DONE_PROCESS or it should be really well documented somewhere
> (AFAICT, it's not currently documented... may be wrong about that).

It is documented in
http://httpd.apache.org/docs-2.0/upgrading.html
although I guess it should also be in the MPM docs if it is MPM specific.

Speaking of which, the upgrading.html doc along with the
new_features_2.0.html doc could really use a looking over by developers to
see what else needs to be added to help people through the upgrading
process.  I've done what I can from CHANGES and a cursory monitoring of
this list, but I'm sure there are things missing.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org


upgrading docs (was Re: [PATCH] Add back -X functionality)

Posted by jo...@slive.ca.
On Thu, 21 Jun 2001, Cliff Woolley wrote:
> At the very least, -X should give a hint that it's
> now -DONE_PROCESS or it should be really well documented somewhere
> (AFAICT, it's not currently documented... may be wrong about that).

It is documented in
http://httpd.apache.org/docs-2.0/upgrading.html
although I guess it should also be in the MPM docs if it is MPM specific.

Speaking of which, the upgrading.html doc along with the
new_features_2.0.html doc could really use a looking over by developers to
see what else needs to be added to help people through the upgrading
process.  I've done what I can from CHANGES and a cursory monitoring of
this list, but I'm sure there are things missing.

Joshua.


Re: [PATCH] Add back -X functionality

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 21 Jun 2001 rbb@covalent.net wrote:

> The !! was there by the way, because it solved a lot of bugs on many
> platforms.

I'd wondered about that myself.  I guess doing !! ensures that the value
is 0 or 1 and not 0 or non-zero?  Whatever.

> In all, I am -0.9 for this patch, I won't veto it, but I don't want to see
> it in the code.  If we do put the -X back in, then remove -DONE_PROCESS.
> Having both is just bogus.

That may be, but IMHO it completely violates the principle of least
astonishment to have -X vaporize.  I wanted to use it one day a month or
so ago, got an error message that it was an unknown flag [with no hint
that it'd changed to -DONE_PROCESS] and had to actually go dig into the
MPM source to figure out how to tell Apache what to go do with itself.
To me, THAT'S bogus.  At the very least, -X should give a hint that it's
now -DONE_PROCESS or it should be really well documented somewhere
(AFAICT, it's not currently documented... may be wrong about that).

Anyhow, I'm +1 on concept [sans the !! stuff].

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: [PATCH] Add back -X functionality

Posted by rb...@covalent.net.
On Thu, 21 Jun 2001, Justin Erenkrantz wrote:

> This attempts to add the -X functionality back into Apache 2.0.
> I chose the simplest way of implementing this - have -X define a config
> symbol called DEBUG (and you could use -DDEBUG as well).  If the MPMs
> detect this symbol, it should do whatever is necessary for DEBUG mode
> (which isn't necessarily ONE_PROCESS).  ONE_PROCESS and NO_DETACH are
> still available.
>
> This patch also removes the !! in the ap_exists_config_define calls
> as I can't fathom what that is good for.
>
> Comments and suggestions welcomed.  -- justin

As I said when this was originally discussed, I really dislike this.  -X
is the exact same as -DONE_PROCESS.  We now have two ways to get into the
same state.  Yuck!  We made a conscious decision to go with -DONE_PROCESS,
the original goal being to move towards environment variables instead of
command line arguments.  The !! was there by the way, because it solved a
lot of bugs on many platforms.

In all, I am -0.9 for this patch, I won't veto it, but I don't want to see
it in the code.  If we do put the -X back in, then remove -DONE_PROCESS.
Having both is just bogus.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------