]> granicus.if.org Git - apache/commitdiff
Cause the command line version of mpm_winnt to do nothing with the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 2 Nov 2000 03:54:23 +0000 (03:54 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 2 Nov 2000 03:54:23 +0000 (03:54 +0000)
  service config unless the -k run argument is provided.

Submitted by: John Sterling <sterling@covalent.net>
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

index 4c773a36d2dac1d6658600da69ed82c9e2e5a3ba..aa9cf976f603aee9ff11ac44bf5c623d5cb5fa36 100644 (file)
@@ -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) 
         {