You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Aaron Bannert <aa...@clove.org> on 2001/08/30 03:23:59 UTC

[PATCH] helpful errors if -X is used on command line

On Wed, Aug 29, 2001 at 08:58:50PM -0400, Cliff Woolley wrote:
> I'd also love to see a patch that looked for -X on the command line and
> exited with an error message to the console saying that -X doesn't exist
> anymore and you should consider using -DONE_PROCESS or -DNO_DETACH...

Roy/Justin may want to produce a patch to re-enable -X functionality
and undo this, but until then this at least tries to tell the user what
they can do instead.

-aaron


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/08/30 01:18:56
@@ -365,6 +365,17 @@
 	    break;
 	case 'h':
 	    usage(process);
+        break;
+    case 'X':
+        printf("The -X option no long exists.\n"
+               "Some MPMs will respect the following runtime parameters:\n"
+               " -DNO_DETACH    - Prevent the parent process from detaching\n"
+               "                  from its controlling terminal.\n"
+               " -DONE_PROCESS  - Prevent the parent process from forking\n"
+               "                  off child processes. [implies -DNO_DETACH]\n"
+               );
+        destroy_and_exit_process(process, 0);
+        break;
 	}
     }
 
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/08/30 01:18:56
@@ -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" {