]> granicus.if.org Git - apache/commitdiff
the mpm-note-child-killed hook was just for use by
authorJeff Trawick <trawick@apache.org>
Wed, 30 Mar 2011 13:42:00 +0000 (13:42 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 30 Mar 2011 13:42:00 +0000 (13:42 +0000)
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

docs/manual/developer/new_api_2_4.xml
include/mpm_common.h
server/mpm_common.c
server/mpm_unix.c

index dfcba97cbe275bac7e4c32dd54105e9faf8c2250..552bed19da06bbe8a8efd1e5404f17f12d9c8b35 100644 (file)
       <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>
 
index f08510aa469d00fa1bf12172b110b5bf8b8686f8..3f66f793ea5dcea090a80f061d016fe260721351 100644 (file)
@@ -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 */
index 232cbf511cebf7454b4a8e1d56769be25b74c4d0..11e5af185f5bec0dcd49d0b24cb50914e3eae6ac 100644 (file)
@@ -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);
index c0620191cb9efe0b71a797e32831f91020c8d05a..b89812342466f296c4288c8ce15a8206637bff40 100644 (file)
@@ -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);
         }
     }