]> granicus.if.org Git - apache/commitdiff
Don't retrieve the default service name if the -k run arg is given.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 17 Aug 2001 16:57:06 +0000 (16:57 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 17 Aug 2001 16:57:06 +0000 (16:57 +0000)
  -k run represents running 'in a console', and is the default if no
  -k option is given at all.

  Perhaps we want to assume -k start as the default (meaning a console
  user in the future would have to explicitly ask for -k run if they
  want to test as a console) now that services are far more stable.
  That can be debated as a seperate patch.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90285 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index b8861ba8f932683ebb4ca6ac3a2160f905764f00..c037fa578638abe65e6a1eb10d163263b319022d 100644 (file)
@@ -129,7 +129,7 @@ static HANDLE maintenance_event;
 static char ap_coredump_dir[MAX_STRING_LEN];
 
 static int one_process = 0;
-static char const* signal_arg;
+static char const* signal_arg = NULL;
 
 OSVERSIONINFO osver; /* VER_PLATFORM_WIN32_NT */
 
@@ -1763,9 +1763,12 @@ void winnt_rewrite_args(process_rec *process)
         }
     }
 
-    if (service_set == SERVICE_UNSET) {
+    /* Get the default for any -k option, except run */
+    if (service_set == SERVICE_UNSET && strcasecmp(signal_arg, "run")) {
         service_set = mpm_service_set_name(process->pool, &service_name,
                                            DEFAULT_SERVICE_NAME);
+        if (APR_STATUS_IS_ENOENT(service_set))
+            service_set = SERVICE_UNSET;
     }
 
     if (!strcasecmp(signal_arg, "install")) /* -k install */