]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
hno squid-2.3.DEVEL3.helper_rotate_log.patch
authorhno <>
Wed, 3 May 2000 02:13:57 +0000 (02:13 +0000)
committerhno <>
Wed, 3 May 2000 02:13:57 +0000 (02:13 +0000)
Squid-2.3.DEVEL3: Restart helpers when rotating logs

Restart helper processes when rotating logs, to have cache.log properly
rotated.

ChangeLog
src/main.cc
src/unlinkd.cc

index 74843966128c3aff41af3b5a448f2837009249c6..21fed316bcfd712235ec3164646ee1555a22ee70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@ Changes to Squid-2.4.DEVEL3 ():
        - proxy_auth_regex and ident_regex ACL types
        - Fixed a StoreEntry memory leak during "dirty" rebuild
        - Helper processes no longer hold unrelated filedescriptors open
+       - Helpers are now restarted when the logs are rotated
 
 Changes to Squid-2.4.DEVEL2 ():
 
index c215569533e3d3d5bf182f9bbd07f4f06bcf0e0a..9140b7d45a847bc89115ca5f05e4c62e53806786 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.308 2000/03/06 16:23:32 wessels Exp $
+ * $Id: main.cc,v 1.309 2000/05/02 20:13:58 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -377,12 +377,18 @@ static void
 mainRotate(void)
 {
     icmpClose();
+    dnsShutdown();
+    redirectShutdown();
+    authenticateShutdown();
     _db_rotate_log();          /* cache.log */
     storeDirWriteCleanLogs(1);
     storeLogRotate();          /* store.log */
     accessLogRotate();         /* access.log */
     useragentRotateLog();      /* useragent.log */
     icmpOpen();
+    dnsInit();
+    redirectInit();
+    authenticateInit();
 }
 
 static void
index dd25a69a6a3942348929531d026cc4e785100197..189f7355e10cf508c0a2a635e8db75f5a7cbfea8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.cc,v 1.34 2000/03/06 16:23:36 wessels Exp $
+ * $Id: unlinkd.cc,v 1.35 2000/05/02 20:13:58 hno Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -48,6 +48,8 @@ main(int argc, char *argv[])
     int x;
     setbuf(stdin, NULL);
     setbuf(stdout, NULL);
+    close(2);
+    open("/dev/null", O_RDWR);
     while (fgets(buf, UNLINK_BUF_LEN, stdin)) {
        if ((t = strchr(buf, '\n')))
            *t = '\0';