From 3e93cdc58d7c700c67f4d40a2df62d8b5a33d36f Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Thu, 2 Nov 2000 03:54:23 +0000 Subject: [PATCH] Cause the command line version of mpm_winnt to do nothing with the service config unless the -k run argument is provided. Submitted by: John Sterling Reviewed by: William Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86795 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/winnt/mpm_winnt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 4c773a36d2..aa9cf976f6 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1824,6 +1824,7 @@ void winnt_rewrite_args(process_rec *process) int fixed_args; char *pid; apr_getopt_t *opt; + int running_as_service = 1; osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osver); @@ -1931,7 +1932,10 @@ void winnt_rewrite_args(process_rec *process) /* Provide a default 'run' -k arg to simplify signal_arg tests */ if (!signal_arg) + { signal_arg = "run"; + running_as_service = 0; + } if (!strcasecmp(signal_arg, "runservice")) { @@ -1955,7 +1959,7 @@ void winnt_rewrite_args(process_rec *process) } } - if (service_named == SERVICE_UNNAMED) { + if (service_named == SERVICE_UNNAMED && running_as_service) { service_named = mpm_service_set_name(process->pool, DEFAULT_SERVICE_NAME); } @@ -1969,7 +1973,7 @@ void winnt_rewrite_args(process_rec *process) exit(1); } } - else + else if (running_as_service) { if (service_named == APR_SUCCESS) { -- 2.50.1