httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/perchild mpm.h perchild.c scoreboard.c scoreboard.h
Date Mon, 31 Jul 2000 01:39:55 GMT
rbb         00/07/30 18:39:55

  Modified:    src      CHANGES
               src/modules/mpm/dexter dexter.c scoreboard.c scoreboard.h
               src/modules/mpm/mpmt_pthread mpmt_pthread.c scoreboard.c
                        scoreboard.h
               src/modules/mpm/perchild mpm.h perchild.c scoreboard.c
                        scoreboard.h
  Log:
  Make the Unix MPMs not clean the scoreboard on a graceful restart.  This
  compiles, but it hasn't actually been tested yet.
  
  Revision  Changes    Path
  1.186     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.185
  retrieving revision 1.186
  diff -u -r1.185 -r1.186
  --- CHANGES	2000/07/29 03:08:12	1.185
  +++ CHANGES	2000/07/31 01:39:51	1.186
  @@ -1,4 +1,8 @@
   Changes with Apache 2.0a5
  +  *) Make dexter, mpmt_pthread, and perchild MPMs not destroy the
  +     scoreboard on graceful restarts.
  +     [Ryan Bloom]
  +
     *) Fix segfault/SIGSEGV when running gzip from mod_mime_magic.c.
        An invalid ap_proc_t was passed to ap_create_process().
        [Jeff Trawick]
  
  
  
  1.118     +4 -1      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- dexter.c	2000/07/30 11:49:28	1.117
  +++ dexter.c	2000/07/31 01:39:51	1.118
  @@ -249,7 +249,7 @@
   }
   
   /* do a graceful restart if graceful == 1 */
  -void ap_start_restart(int graceful)
  +static void ap_start_restart(int graceful)
   {
   
       if (restart_pending == 1) {
  @@ -258,6 +258,9 @@
       }
       restart_pending = 1;
       is_graceful = graceful;
  +    if (is_graceful) {
  +        ap_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem);
  +    }
   }
   
   static void sig_term(int sig)
  
  
  
  1.20      +2 -2      apache-2.0/src/modules/mpm/dexter/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/scoreboard.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- scoreboard.c	2000/07/26 18:07:34	1.19
  +++ scoreboard.c	2000/07/31 01:39:51	1.20
  @@ -88,7 +88,7 @@
   
   static ap_shmem_t *scoreboard_shm = NULL;
   
  -static ap_status_t cleanup_shared_mem(void *d)
  +ap_status_t ap_cleanup_shared_mem(void *d)
   {
       ap_shm_free(scoreboard_shm, ap_scoreboard_image);
       ap_scoreboard_image = NULL;
  @@ -116,7 +116,7 @@
           ap_shm_destroy(scoreboard_shm);
           exit(APEXIT_INIT);
       }
  -    ap_register_cleanup(p, NULL, cleanup_shared_mem, ap_null_cleanup);
  +    ap_register_cleanup(p, NULL, ap_cleanup_shared_mem, ap_null_cleanup);
   }
   
   void reinit_scoreboard(ap_pool_t *p)
  
  
  
  1.10      +2 -0      apache-2.0/src/modules/mpm/dexter/scoreboard.h
  
  Index: scoreboard.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/scoreboard.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- scoreboard.h	2000/06/21 23:00:03	1.9
  +++ scoreboard.h	2000/07/31 01:39:51	1.10
  @@ -100,6 +100,8 @@
   
   API_VAR_EXPORT extern const char *ap_scoreboard_fname;
   
  +ap_status_t ap_cleanup_shared_mem(void *d);
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.114     +4 -1      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- mpmt_pthread.c	2000/07/29 16:24:12	1.113
  +++ mpmt_pthread.c	2000/07/31 01:39:54	1.114
  @@ -246,7 +246,7 @@
   }
   
   /* do a graceful restart if graceful == 1 */
  -void ap_start_restart(int graceful)
  +static void ap_start_restart(int graceful)
   {
   
       if (restart_pending == 1) {
  @@ -255,6 +255,9 @@
       }
       restart_pending = 1;
       is_graceful = graceful;
  +    if (is_graceful) {
  +        ap_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem);
  +    }
   }
   
   static void sig_term(int sig)
  
  
  
  1.37      +2 -2      apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- scoreboard.c	2000/07/22 03:36:21	1.36
  +++ scoreboard.c	2000/07/31 01:39:54	1.37
  @@ -90,7 +90,7 @@
   
   static ap_shmem_t *scoreboard_shm = NULL;
   
  -static ap_status_t cleanup_shared_mem(void *d)
  +ap_status_t ap_cleanup_shared_mem(void *d)
   {
       ap_shm_free(scoreboard_shm, ap_scoreboard_image);
       ap_scoreboard_image = NULL;
  @@ -120,7 +120,7 @@
           ap_shm_destroy(scoreboard_shm);
           exit(APEXIT_INIT);
       }
  -    ap_register_cleanup(p, NULL, cleanup_shared_mem, ap_null_cleanup);
  +    ap_register_cleanup(p, NULL, ap_cleanup_shared_mem, ap_null_cleanup);
       ap_scoreboard_image->global.running_generation = 0;
   }
   
  
  
  
  1.20      +1 -1      apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.h
  
  Index: scoreboard.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- scoreboard.h	2000/06/21 23:04:02	1.19
  +++ scoreboard.h	2000/07/31 01:39:54	1.20
  @@ -211,7 +211,7 @@
   
   API_EXPORT(int) ap_exists_scoreboard_image(void);
   void reinit_scoreboard(ap_pool_t *p);
  -void cleanup_scoreboard(void);
  +ap_status_t ap_cleanup_shared_mem(void *d);
   API_EXPORT(void) ap_sync_scoreboard_image(void);
   void ap_mpmt_pthread_force_reset_connection_status(long conn_id);
   
  
  
  
  1.3       +1 -1      apache-2.0/src/modules/mpm/perchild/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/mpm.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mpm.h	2000/07/30 12:03:47	1.2
  +++ mpm.h	2000/07/31 01:39:54	1.3
  @@ -66,7 +66,7 @@
   #define PERCHILD_MPM
   
   #define MPM_NEEDS_RECLAIM_CHILD_PROCESSES 1
  -#define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
  +#define MPM_SYNC_CHILD_TABLE()
   #define MPM_CHILD_PID(i) (ap_child_table[i].pid)
   #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
   
  
  
  
  1.8       +4 -1      apache-2.0/src/modules/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/perchild.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- perchild.c	2000/07/30 11:49:29	1.7
  +++ perchild.c	2000/07/31 01:39:54	1.8
  @@ -282,7 +282,7 @@
   }
   
   /* do a graceful restart if graceful == 1 */
  -void ap_start_restart(int graceful)
  +static void ap_start_restart(int graceful)
   {
   
       if (restart_pending == 1) {
  @@ -291,6 +291,9 @@
       }
       restart_pending = 1;
       is_graceful = graceful;
  +    if (is_graceful) {
  +        ap_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem);
  +    }
   }
   
   static void sig_term(int sig)
  
  
  
  1.2       +2 -2      apache-2.0/src/modules/mpm/perchild/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/scoreboard.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scoreboard.c	2000/07/27 00:16:32	1.1
  +++ scoreboard.c	2000/07/31 01:39:54	1.2
  @@ -88,7 +88,7 @@
   
   static ap_shmem_t *scoreboard_shm = NULL;
   
  -static ap_status_t cleanup_shared_mem(void *d)
  +ap_status_t ap_cleanup_shared_mem(void *d)
   {
       ap_shm_free(scoreboard_shm, ap_scoreboard_image);
       ap_scoreboard_image = NULL;
  @@ -116,7 +116,7 @@
           ap_shm_destroy(scoreboard_shm);
           exit(APEXIT_INIT);
       }
  -    ap_register_cleanup(p, NULL, cleanup_shared_mem, ap_null_cleanup);
  +    ap_register_cleanup(p, NULL, ap_cleanup_shared_mem, ap_null_cleanup);
   }
   
   void reinit_scoreboard(ap_pool_t *p)
  
  
  
  1.2       +1 -0      apache-2.0/src/modules/mpm/perchild/scoreboard.h
  
  Index: scoreboard.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/scoreboard.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scoreboard.h	2000/07/27 00:16:32	1.1
  +++ scoreboard.h	2000/07/31 01:39:54	1.2
  @@ -99,6 +99,7 @@
   #define SCOREBOARD_SIZE		sizeof(scoreboard)
   
   API_VAR_EXPORT extern const char *ap_scoreboard_fname;
  +ap_status_t ap_cleanup_shared_mem(void *d);
   
   #ifdef __cplusplus
   }
  
  
  

Mime
View raw message