httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r543654 - in /httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2: mpm.h mpmt_os2.c
Date Fri, 01 Jun 2007 23:04:44 GMT
Author: rpluem
Date: Fri Jun  1 16:04:43 2007
New Revision: 543654

URL: http://svn.apache.org/viewvc?view=rev&rev=543654
Log:
* Use local pid table also for OS/2 MPM

Modified:
    httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpm.h
    httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpmt_os2.c

Modified: httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpm.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpm.h?view=diff&rev=543654&r1=543653&r2=543654
==============================================================================
--- httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpm.h (original)
+++ httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpm.h Fri Jun  1 16:04:43 2007
@@ -30,6 +30,7 @@
 #include "httpd.h"
 #include "mpm_default.h"
 #include "scoreboard.h"
+#include "mpm_common.h"
 
 #define MPM_NAME "MPMT_OS2"
 

Modified: httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpmt_os2.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpmt_os2.c?view=diff&rev=543654&r1=543653&r2=543654
==============================================================================
--- httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpmt_os2.c (original)
+++ httpd/httpd/branches/httpd-pid-table/server/mpm/mpmt_os2/mpmt_os2.c Fri Jun  1 16:04:43
2007
@@ -281,6 +281,7 @@
 #endif
     if (one_process) {
         ap_scoreboard_image->parent[0].pid = getpid();
+        ap_set_pid_table(getpid());
         ap_mpm_child_main(pconf);
         return FALSE;
     }
@@ -313,6 +314,7 @@
             if (slot < HARD_SERVER_LIMIT) {
                 ap_scoreboard_image->parent[slot].pid = 0;
                 ap_scoreboard_image->parent[slot].quiescing = 0;
+                ap_unset_pid_table(child_pid);
 
                 if (proc_rc.codeTerminate == TC_EXIT) {
                     /* Child terminated normally, check its exit code and
@@ -330,7 +332,12 @@
 
     /* Signal children to shut down, either gracefully or immediately */
     for (slot=0; slot<HARD_SERVER_LIMIT; slot++) {
-      kill(ap_scoreboard_image->parent[slot].pid, is_graceful ? SIGHUP : SIGTERM);
+        PID pid;
+
+        pid = ap_scoreboard_image->parent[n].pid;
+        if (ap_in_pid_table(pid)) {
+            kill(pid, is_graceful ? SIGHUP : SIGTERM);
+        }
     }
 
     DosFreeMem(parent_info);
@@ -364,6 +371,7 @@
     }
 
     ap_scoreboard_image->parent[slot].pid = proc_rc.codeTerminate;
+    ap_set_pid_table(proc_rc.codeTerminate);
 }
 
 



Mime
View raw message