httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r831951 - in /httpd/httpd/trunk/server/mpm/netware: mpm.h mpm_netware.c
Date Mon, 02 Nov 2009 16:32:06 GMT
Author: trawick
Date: Mon Nov  2 16:32:05 2009
New Revision: 831951

URL: http://svn.apache.org/viewvc?rev=831951&view=rev
Log:
follow up r791309 with additional changes to accommodate the new MPM interfaces
(some old API variables are now private, support retrieval of the MPM generation, 
implement the mpm_note_child_killed hook)

Removed:
    httpd/httpd/trunk/server/mpm/netware/mpm.h
Modified:
    httpd/httpd/trunk/server/mpm/netware/mpm_netware.c

Modified: httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/netware/mpm_netware.c?rev=831951&r1=831950&r2=831951&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/trunk/server/mpm/netware/mpm_netware.c Mon Nov  2 16:32:05 2009
@@ -110,7 +110,11 @@
 
 /* config globals */
 
-int ap_threads_per_child=0;         /* Worker threads per child */
+server_rec *ap_server_conf;
+
+/* *Non*-shared http_main globals... */
+
+static int ap_threads_per_child=0;         /* Worker threads per child */
 static int ap_threads_to_start=0;
 static int ap_threads_min_free=0;
 static int ap_threads_max_free=0;
@@ -122,10 +126,7 @@
  * to deal with MaxClients changes across SIGWINCH restarts.  We use this
  * value to optimize routines that have to scan the entire scoreboard.
  */
-int ap_max_workers_limit = -1;
-server_rec *ap_server_conf;
-
-/* *Non*-shared http_main globals... */
+static int ap_max_workers_limit = -1;
 
 int hold_screen_on_exit = 0; /* Indicates whether the screen should be held open */
 
@@ -171,7 +172,7 @@
 static int volatile restart_pending;
 static int volatile is_graceful;
 static int volatile wait_to_finish=1;
-ap_generation_t volatile ap_my_generation=0;
+static ap_generation_t volatile ap_my_generation=0;
 
 /* a clean exit from a child with proper cleanup */
 static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans,
@@ -242,6 +243,9 @@
         case AP_MPMQ_MPM_STATE:
             *result = mpm_state;
             break;
+        case AP_MPMQ_GENERATION:
+            *result = ap_my_generation;
+            break;
         default:
             *rv = APR_ENOTIMPL;
             break;
@@ -249,6 +253,12 @@
     return OK;
 }
 
+static apr_status_t netware_note_child_killed(int childnum)
+{
+    ap_scoreboard_image->parent[childnum].pid = 0;
+    return APR_SUCCESS;
+}
+
 static const char *netware_get_name(void)
 {
     return "NetWare";
@@ -1099,6 +1109,7 @@
     //ap_hook_open_logs(netware_open_logs, NULL, aszSucc, APR_HOOK_REALLY_FIRST);
     ap_hook_mpm(netware_run, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_mpm_query(netware_query, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_mpm_note_child_killed(netware_note_child_killed, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_mpm_get_name(netware_get_name, NULL, NULL, APR_HOOK_MIDDLE);
 }
 



Mime
View raw message