Commit 28e226d0 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Don't retrieve the default service name if the -k run arg is given.
  -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
parent c9677e7e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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 */