From: hno <> Date: Wed, 3 May 2000 02:13:57 +0000 (+0000) Subject: hno squid-2.3.DEVEL3.helper_rotate_log.patch X-Git-Tag: SQUID_3_0_PRE1~2016 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e40aa8dac7e575b1f766f3245f8b63401b53accc;p=thirdparty%2Fsquid.git hno squid-2.3.DEVEL3.helper_rotate_log.patch Squid-2.3.DEVEL3: Restart helpers when rotating logs Restart helper processes when rotating logs, to have cache.log properly rotated. --- diff --git a/ChangeLog b/ChangeLog index 7484396612..21fed316bc 100644 --- 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 (): diff --git a/src/main.cc b/src/main.cc index c215569533..9140b7d45a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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 diff --git a/src/unlinkd.cc b/src/unlinkd.cc index dd25a69a6a..189f7355e1 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -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';