You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@apache.org on 2001/12/25 13:24:14 UTC

cvs commit: httpd-2.0/os/unix unixd.h

dreid       01/12/25 04:24:14

  Modified:    server/mpm/worker worker.c
               .        STATUS
               os/beos  beosd.h
               os/unix  unixd.h
  Log:
  Add ap_os_killpg as well as unixd_killpg and beosd_killpg.
  
  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.
  
  Revision  Changes    Path
  1.54      +2 -2      httpd-2.0/server/mpm/worker/worker.c
  
  Index: worker.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- worker.c	2001/12/25 02:34:29	1.53
  +++ worker.c	2001/12/25 12:24:14	1.54
  @@ -1466,7 +1466,7 @@
            */
           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 @@
            * 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");
           }
  
  
  
  1.360     +4 -1      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.359
  retrieving revision 1.360
  diff -u -r1.359 -r1.360
  --- STATUS	2001/12/24 13:24:30	1.359
  +++ STATUS	2001/12/25 12:24:14	1.360
  @@ -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:
   
  @@ -347,6 +347,9 @@
         +1:   Justin, Jeff, Ian
         -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':
  
  
  
  1.13      +1 -0      httpd-2.0/os/beos/beosd.h
  
  Index: beosd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/beos/beosd.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- beosd.h	2001/12/23 14:13:07	1.12
  +++ beosd.h	2001/12/25 12:24:14	1.13
  @@ -91,6 +91,7 @@
                                         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, \
  
  
  
  1.32      +2 -0      httpd-2.0/os/unix/unixd.h
  
  Index: unixd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/unix/unixd.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- unixd.h	2001/11/13 22:42:38	1.31
  +++ unixd.h	2001/12/25 12:24:14	1.32
  @@ -125,8 +125,10 @@
   
   #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	\