httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server scoreboard.c
Date Wed, 07 Feb 2001 21:41:44 GMT
rbb         01/02/07 13:41:44

  Modified:    server   scoreboard.c
  Log:
  Fix graceful shutdown with the scoreboard changes.  Basically, we want
  to set the sb_type only after we zero out the scoreboard.  Before this,
  we were segfaulting when we tried to free() a shared memory scoreboard.
  
  Revision  Changes    Path
  1.8       +1 -2      httpd-2.0/server/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -d -b -w -u -r1.7 -r1.8
  --- scoreboard.c	2001/02/07 20:49:24	1.7
  +++ scoreboard.c	2001/02/07 21:41:43	1.8
  @@ -168,7 +168,6 @@
       if (ap_scoreboard_image == NULL) {
           if (sb_type == SB_SHARED) {
               setup_shared(p);
  -            ap_scoreboard_image->global.sb_type = SB_SHARED;
           }
           else {
               /* A simple malloc will suffice */
  @@ -180,10 +179,10 @@
                   perror(buf); /* o.k. since MM sets errno */
                   exit(APEXIT_INIT);            
               }
  -            ap_scoreboard_image->global.sb_type = SB_NOT_SHARED;
           }
       }
       memset(ap_scoreboard_image, 0, SCOREBOARD_SIZE);
  +    ap_scoreboard_image->global.sb_type = sb_type;
       ap_scoreboard_image->global.running_generation = running_gen;
       ap_restart_time = apr_now();
       apr_register_cleanup(p, NULL, ap_cleanup_scoreboard, apr_null_cleanup);
  
  
  

Mime
View raw message