]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR50350: When no -k option is provided on the httpd command line, the server
authorEric Covener <covener@apache.org>
Mon, 29 Nov 2010 00:10:22 +0000 (00:10 +0000)
committerEric Covener <covener@apache.org>
Mon, 29 Nov 2010 00:10:22 +0000 (00:10 +0000)
was starting without checking for an existing pidfile.

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

CHANGES
server/mpm_unix.c

diff --git a/CHANGES b/CHANGES
index 3e6d875abfc4d011816623103b132b128cc2cb46..03302dbf92baf129dac0d50b116f6720ae332d09 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.10
 
+  *) httpd: When no -k option is provided on the httpd command line, the server
+     was starting without checking for an existing pidfile.  PR 50350 
+     [Eric Covener] 
   *) mod_proxy: Put the worker in error state if the SSL handshake with the
      backend fails. PR 50332.
      [Daniel Ruggeri <DRuggeri primary.net>, Ruediger Pluem]
index 81abbb1a2adc835b99d97ae5e367e364d79887cc..c0620191cb9efe0b71a797e32831f91020c8d05a 100644 (file)
@@ -610,6 +610,7 @@ void ap_mpm_pod_killpg(ap_pod_t *pod, int num)
 }
 
 static const char *dash_k_arg = NULL;
+static const char *dash_k_arg_noarg = "noarg";
 
 static int send_signal(pid_t pid, int sig)
 {
@@ -656,7 +657,7 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
         }
     }
 
-    if (!strcmp(dash_k_arg, "start")) {
+    if (!strcmp(dash_k_arg, "start") || dash_k_arg == dash_k_arg_noarg) {
         if (running) {
             printf("%s\n", status);
             return 1;
@@ -755,10 +756,12 @@ void ap_mpm_rewrite_args(process_rec *process)
 
     process->argc = mpm_new_argv->nelts;
     process->argv = (const char * const *)mpm_new_argv->elts;
-
-    if (dash_k_arg) {
-        APR_REGISTER_OPTIONAL_FN(ap_signal_server);
+  
+    if (NULL == dash_k_arg) { 
+        dash_k_arg = dash_k_arg_noarg;
     }
+
+    APR_REGISTER_OPTIONAL_FN(ap_signal_server);
 }
 
 static pid_t parent_pid, my_pid;