httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-2.0/server scoreboard.c
Date Wed, 23 Jan 2002 06:51:18 GMT
aaron       02/01/22 22:51:18

  Modified:    server   scoreboard.c
  Log:
  Although this patch is technically correct, I'm not happy with
  the way it gets things done. OTOH, it is a simple enough change
  to get things working correctly for now. I will come up with
  the right way to do this in the next couple days.
  
  This patch re-enables the use of anonymous shared memory in the
  scoreboard on platforms that have it.
  
  Revision  Changes    Path
  1.47      +14 -5     httpd-2.0/server/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- scoreboard.c	14 Jan 2002 22:36:03 -0000	1.46
  +++ scoreboard.c	23 Jan 2002 06:51:18 -0000	1.47
  @@ -164,14 +164,23 @@
       apr_status_t rv;
       char *fname = NULL;
   
  -    if (ap_scoreboard_fname) {
  -        fname = ap_server_root_relative(p, ap_scoreboard_fname);
  -    }
       rv = apr_shm_create(&scoreboard_shm, scoreboard_size, fname, p);
  -    if (rv != APR_SUCCESS) {
  +    if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
  -                     "Fatal error: could not open(create) scoreboard");
  +                     "Fatal error: could not create scoreboard "
  +                     "(using anonymous shared memory)");
           return rv;
  +    }
  +    if (rv == APR_ENOTIMPL) {
  +        if (ap_scoreboard_fname) {
  +            fname = ap_server_root_relative(p, ap_scoreboard_fname);
  +        }
  +        rv = apr_shm_create(&scoreboard_shm, scoreboard_size, fname, p);
  +        if (rv != APR_SUCCESS) {
  +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
  +                         "Fatal error: could not open(create) scoreboard");
  +            return rv;
  +        }
       }
       /* everything will be cleared shortly */
   #endif
  
  
  

Mime
View raw message