Commit 1cd992cf authored by Jeff Trawick's avatar Jeff Trawick
Browse files

the mpm-note-child-killed hook was just for use by

ap_{reclaim,relieve}_child_processes; those functions can
invoke the hook directly; the function ap_mpm_note_child_killed()
is useless


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086953 13f79535-47bb-0310-9956-ffa450edef68
parent 5ce9530b
Loading
Loading
Loading
Loading
+1 −1
Changes for docs/manual/developer/new_api_2_4.xml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@
      <li>REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)</li>
      <li>NEW API to drop privileges (delegates this platform-dependent
          function to modules)</li>
      <li>NEW Hooks: mpm_query, mpm_note_child_killed, timed_callback, get_name, and function ap_mpm_note_child_killed</li>
      <li>NEW Hooks: mpm_query, mpm_note_child_killed, timed_callback, and get_name</li>
    </ul>
  </section>

+5 −3
Changes for include/mpm_common.h: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -321,8 +321,6 @@ extern const char *ap_mpm_set_exception_hook(cmd_parms *cmd, void *dummy,
                                             const char *arg);
#endif

AP_DECLARE(apr_status_t) ap_mpm_note_child_killed(int childnum);

AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p, server_rec *s))

/* register modules that undertake to manage system security */
@@ -335,7 +333,11 @@ AP_DECLARE_HOOK(int, drop_privileges, (apr_pool_t * pchild, server_rec * s))
 */
AP_DECLARE_HOOK(int, mpm_query, (int query_code, int *result, apr_status_t *rv))

/* child specified by index has been killed */
/* child specified by index has been killed; MPMs which use
 * ap_reclaim_child_processes() or ap_relieve_child_processes() must
 * implement this in order to update the scoreboard and handle any
 * MPM-specific actions
 */
AP_DECLARE_HOOK(apr_status_t, mpm_note_child_killed, (int childnum))

/* register the specified callback */
+0 −5
Changes for server/mpm_common.c: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -373,11 +373,6 @@ AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
    return rv;
}

AP_DECLARE(apr_status_t) ap_mpm_note_child_killed(int childnum)
{
    return ap_run_mpm_note_child_killed(childnum);
}

AP_DECLARE(apr_status_t) ap_mpm_register_timed_callback(apr_time_t t, ap_mpm_callback_fn_t *cbfn, void *baton)
{
    return ap_run_mpm_register_timed_callback(t, cbfn, baton);
+2 −2
Changes for server/mpm_unix.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ void ap_reclaim_child_processes(int terminate)
            }

            if (reclaim_one_pid(pid, action_table[cur_action].action)) {
                ap_mpm_note_child_killed(i);
                ap_run_mpm_note_child_killed(i);
            }
            else {
                ++not_dead_yet;
@@ -273,7 +273,7 @@ void ap_relieve_child_processes(void)
        }

        if (reclaim_one_pid(pid, DO_NOTHING)) {
            ap_mpm_note_child_killed(i);
            ap_run_mpm_note_child_killed(i);
        }
    }