]> granicus.if.org Git - apache/commitdiff
Add ap_os_killpg as well as unixd_killpg and beosd_killpg.
authorDavid Reid <dreid@apache.org>
Tue, 25 Dec 2001 12:24:14 +0000 (12:24 +0000)
committerDavid Reid <dreid@apache.org>
Tue, 25 Dec 2001 12:24:14 +0000 (12:24 +0000)
Move the worker MPM to use ap_os_killpg in place of unixd_killpg as
this makes it more portable.

Ryan notes that really we should be using the POD mechanism to
control death of the child processes, so this is temporary until
we have that change in place.  Note added to STATUS to that effect.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92598 13f79535-47bb-0310-9956-ffa450edef68

STATUS
os/beos/beosd.h
os/unix/unixd.h
server/mpm/worker/worker.c

diff --git a/STATUS b/STATUS
index 585d122aebc9ff56109e88a42cb4a059b4081da7..4ab15fdebea7192dcfb6840ed075f8481a456c7d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                             -*-text-*-
-Last modified at [$Date: 2001/12/24 13:24:30 $]
+Last modified at [$Date: 2001/12/25 12:24:14 $]
 
 Release:
 
@@ -348,6 +348,9 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
       -0:   Aaron (premature decision, needs more discussion)
       -0:   Cliff (I think the default config should be the safest possible)
 
+    * Fix the worker MPM to use POD to kill child processes instead
+      of ap_os_killpg, regardless of how they should die. (Ryan Bloom)
+
 PRs that have been suspended forever waiting for someone to
 put them into 'the next release':
 
index b507f2b912f57130121821bd91586fa4f129d642..28e47eece5cb0c4282f2132a7310a0bb63ed19e9 100644 (file)
@@ -91,6 +91,7 @@ AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
                                       apr_pool_t *ptrans);
 
 #define beosd_killpg(x, y)     (kill (-(x), (y)))
+#define ap_os_killpg(x, y)      (kill (-(x), (y)))
 
 #define BEOS_DAEMON_COMMANDS   \
 AP_INIT_TAKE1("User", beosd_set_user, NULL, RSRC_CONF, \
index ef906feca4f43b8b0cd818cdf08fe5ec6b1b15d0..21f1f0f3f0e943915b1b5d9db8d706c6f29f7b96 100644 (file)
@@ -125,8 +125,10 @@ AP_DECLARE(apr_status_t) unixd_accept(void **accepted, ap_listen_rec *lr, apr_po
 
 #ifdef HAVE_KILLPG
 #define unixd_killpg(x, y)     (killpg ((x), (y)))
+#define ap_os_killpg(x, y)      (killpg ((x), (y)))
 #else /* HAVE_KILLPG */
 #define unixd_killpg(x, y)     (kill (-(x), (y)))
+#define ap_os_killpg(x, y)      (kill (-(x), (y)))
 #endif /* HAVE_KILLPG */
 
 #define UNIX_DAEMON_COMMANDS   \
index 872ada2be3cde0b3d0d32dff917f3beefe4727db..aeebad24ba33d6ca58eaa47f390206159e16d271 100644 (file)
@@ -1466,7 +1466,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
          */
         wake_up_and_die();
 
-        if (unixd_killpg(getpgrp(), SIGTERM) < 0) {
+        if (ap_os_killpg(getpgrp(), SIGTERM) < 0) {
             ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
                          "killpg SIGTERM");
         }
@@ -1521,7 +1521,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
          * and a SIGHUP, we may as well use the same signal, because some user
          * pthreads are stealing signals from us left and right.
          */
-        if (unixd_killpg(getpgrp(), SIGTERM) < 0) {
+        if (ap_os_killpg(getpgrp(), SIGTERM) < 0) {
             ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, 
                          "killpg SIGTERM");
         }