From: William A. Rowe Jr Date: Fri, 17 Aug 2001 16:57:06 +0000 (+0000) Subject: Don't retrieve the default service name if the -k run arg is given. X-Git-Tag: 2.0.24~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee82e657132caf2e55cf6b312cc61e334e4bc492;p=apache 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 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index b8861ba8f9..c037fa5786 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -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 */