Commit 2fa4bab6 authored by Paul J. Reder's avatar Paul J. Reder
Browse files

The prefork and OS/2 MPMs are overwriting the pid file when a second copy
of httpd is started and shuts down due to socket conflict. Moving the
call to ap_log_pid solves the problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90418 13f79535-47bb-0310-9956-ffa450edef68
parent 59de4356
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.25-dev

  *) The prefork and OS/2 MPMs are overwriting the pid file when a second copy
     of httpd is started and shuts down due to socket conflict. Moving the
     call to ap_log_pid solves the problem.

  *) Changed the late-1.3 log_config substitution %c to %X, to log the
     status of the closed connection, as it conflicts with the far more
     common, historical ssl logging directive %...{var}c.  [William Rowe]
+2 −1
Original line number Diff line number Diff line
@@ -193,7 +193,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
        /* Parent process */
        char restart;
        is_parent_process = TRUE;
        ap_log_pid(pconf, ap_pid_fname);

        if (ap_setup_listeners(ap_server_conf) < 1) {
            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
@@ -201,6 +200,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
            return 1;
        }

        ap_log_pid(pconf, ap_pid_fname);

        restart = master_main();
        ++ap_my_generation;
        ap_scoreboard_image->global.running_generation = ap_my_generation;
+3 −2
Original line number Diff line number Diff line
@@ -1110,12 +1110,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)

    ap_server_conf = s;
 
    ap_log_pid(pconf, ap_pid_fname);

    if (setup_listeners(s)) {
	/* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
	return 1;
    }

    ap_log_pid(pconf, ap_pid_fname);

    if ((rv = ap_mpm_pod_open(pconf, &pod))) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
		"Could not open pipe-of-death.");
+2 −1
Original line number Diff line number Diff line
@@ -926,7 +926,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)

    pconf = _pconf;
    ap_server_conf = s;
    ap_log_pid(pconf, ap_pid_fname);

    if ((status = ap_listen_open(s->process, s->port)) != APR_SUCCESS) {
	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, status, s,
@@ -934,6 +933,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
	return -1;
    }

    ap_log_pid(pconf, ap_pid_fname);

    SAFE_ACCEPT(accept_mutex_init(pconf));

    if (!is_graceful) {