PR50350: When no -k option is provided on the httpd command line, the server

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
This commit is contained in:
Eric Covener
2010-11-29 00:10:22 +00:00
parent c43460c2ba
commit d185fd5f57
2 changed files with 11 additions and 4 deletions

View File

@ -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]

View 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;
@ -756,9 +757,11 @@ 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;