From: Jeff Trawick Date: Wed, 30 Mar 2011 13:42:00 +0000 (+0000) Subject: the mpm-note-child-killed hook was just for use by X-Git-Tag: 2.3.12~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1e1cff7f9e54355e978ed050935ff0e9e74047c;p=apache 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 --- diff --git a/docs/manual/developer/new_api_2_4.xml b/docs/manual/developer/new_api_2_4.xml index dfcba97cbe..552bed19da 100644 --- a/docs/manual/developer/new_api_2_4.xml +++ b/docs/manual/developer/new_api_2_4.xml @@ -222,7 +222,7 @@
  • REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)
  • NEW API to drop privileges (delegates this platform-dependent function to modules)
  • -
  • NEW Hooks: mpm_query, mpm_note_child_killed, timed_callback, get_name, and function ap_mpm_note_child_killed
  • +
  • NEW Hooks: mpm_query, mpm_note_child_killed, timed_callback, and get_name
  • diff --git a/include/mpm_common.h b/include/mpm_common.h index f08510aa46..3f66f793ea 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -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 */ diff --git a/server/mpm_common.c b/server/mpm_common.c index 232cbf511c..11e5af185f 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -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); diff --git a/server/mpm_unix.c b/server/mpm_unix.c index c0620191cb..b898123424 100644 --- a/server/mpm_unix.c +++ b/server/mpm_unix.c @@ -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); } }