httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: FIX to stuck children with 1.2b7! (!!!!) (fwd)
Date Thu, 03 Apr 1997 23:57:05 GMT
This is the result of a discussion I had with him about some problems he
was seeing with child processes hanging around.  The below changes look
logical, but I have not had time to do anything other than look them over
in 5 seconds...

Should go in soon.

---------- Forwarded message ----------
Date: Tue, 1 Apr 1997 16:56:05 -0800 (PST)
From: Brian Moore <bem@cmc.net>
To: Marc Slemko <marcs@znep.com>, apache-bugs@apache.org
Cc: bem@cmc.net, mat@isdnet.net, parker@austx.tandem.com
Subject: Re: FIX to stuck children with 1.2b7! (!!!!)

Ooops... missed one return.  This is all of them this time (the missed one is
the one around line 135 if you're lazy.... It snuck past me... and it seems to
be the one that is the most critical, actually.. doh.)

Anyway, look at the code and you'll see why these are needed. :)

diff -c proxy_cache.old proxy_cache.c
*** proxy_cache.old     Tue Apr  1 14:37:48 1997
--- proxy_cache.c       Tue Apr  1 16:44:53 1997
***************
*** 119,124 ****
--- 119,125 ----
        if (errno != ENOENT)
        {
            proxy_log_uerror("stat", filename, NULL, r->server);
+             unblock_alarms();
            return;
        }
        if (creat(filename, 0666) == -1)
***************
*** 127,138 ****
                proxy_log_uerror("creat", filename, NULL, r->server);
            else
                lastcheck = abs(now);  /* someone else got in there */
            return;
        }
      } else
      {
        lastcheck = buf.st_mtime;  /* save the time */
!       if (now < lastcheck + every) return;
        if (utime(filename, NULL) == -1)
            proxy_log_uerror("utimes", filename, NULL, r->server);
      }
--- 128,143 ----
                proxy_log_uerror("creat", filename, NULL, r->server);
            else
                lastcheck = abs(now);  /* someone else got in there */
+             unblock_alarms();
            return;
        }
      } else
      {
        lastcheck = buf.st_mtime;  /* save the time */
!       if (now < lastcheck + every) {
!            unblock_alarms();
!            return;
!         }
        if (utime(filename, NULL) == -1)
            proxy_log_uerror("utimes", filename, NULL, r->server);
      }
***************
*** 142,149 ****
  
      sub_garbage_coll(r,files,cachedir,"/");
  
!     if (curblocks < cachesize || curblocks + curbytes <= cachesize)
        return;
  
      qsort(files->elts, files->nelts, sizeof(struct gc_ent *), gcdiff);
  
--- 147,156 ----
  
      sub_garbage_coll(r,files,cachedir,"/");
  
!     if (curblocks < cachesize || curblocks + curbytes <= cachesize) {
!         unblock_alarms();
        return;
+     }
  
      qsort(files->elts, files->nelts, sizeof(struct gc_ent *), gcdiff);
  



Mime
View raw message