/*
- * $Id: dns.cc,v 1.36 1997/07/07 05:29:44 wessels Exp $
+ * $Id: dns.cc,v 1.37 1997/07/15 05:34:08 wessels Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
return -1;
}
listen(cfd, 1);
+ /* flush or else we get dup data if unbuffered_logs is set */
+ logsFlush();
if ((pid = fork()) < 0) {
debug(50, 0) ("dnsOpenServer: fork: %s\n", xstrerror());
comm_close(cfd);
/*
- * $Id: ftp.cc,v 1.131 1997/07/14 23:44:59 wessels Exp $
+ * $Id: ftp.cc,v 1.132 1997/07/15 05:34:09 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
char *t = NULL;
StoreEntry *e = ftpState->entry;
http_reply *reply = e->mem_obj->reply;
- debug(0,0)("ftpAppendSuccessHeader: %s\n", ftpState->entry->url);
if (EBIT_TEST(ftpState->flags, FTP_HTTP_HEADER_SENT))
return;
EBIT_SET(ftpState->flags, FTP_HTTP_HEADER_SENT);
-extern FILE *debug_log;
+extern FILE *debug_log; /* NULL */
+extern FILE *cache_useragent_log; /* NULL */
extern Meta_data meta_data;
extern SquidConfig Config;
extern SquidConfig2 Config2;
#ifdef HAVE_SYSLOG
extern int _db_level;
#endif
+
/*
- * $Id: icmp.cc,v 1.39 1997/07/14 03:33:38 wessels Exp $
+ * $Id: icmp.cc,v 1.40 1997/07/15 05:34:10 wessels Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
getsockname(child_sock, (struct sockaddr *) &S, &namelen);
if (comm_connect_addr(icmp_sock, &S) != COMM_OK)
fatal_dump(xstrerror());
+ /* flush or else we get dup data if unbuffered_logs is set */
+ logsFlush();
if ((pid = fork()) < 0) {
debug(50, 0) ("icmpOpen: fork: %s\n", xstrerror());
comm_close(icmp_sock);
/*
- * $Id: main.cc,v 1.161 1997/07/14 23:45:02 wessels Exp $
+ * $Id: main.cc,v 1.162 1997/07/15 05:34:11 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
debug(1, 0) ("Starting Squid Cache version %s for %s...\n",
version_string,
CONFIG_HOST_TYPE);
+ debug(1, 0) ("Process ID %d\n", (int) getpid());
debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD);
if (!configured_once) {
extern int intAverage _PARAMS((int, int, int, int));
extern double doubleAverage _PARAMS((double, double, int, int));
extern void debug_trap _PARAMS((const char *));
+extern void logsFlush _PARAMS((void));
extern void unlinkdInit _PARAMS((void));
/*
- * $Id: redirect.cc,v 1.44 1997/06/04 06:16:07 wessels Exp $
+ * $Id: redirect.cc,v 1.45 1997/07/15 05:34:12 wessels Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
return -1;
}
listen(cfd, 1);
+ /* flush or else we get dup data if unbuffered_logs is set */
+ logsFlush();
if ((pid = fork()) < 0) {
debug(50, 0) ("redirect_create_redirector: fork: %s\n", xstrerror());
comm_close(cfd);
/*
- * $Id: tools.cc,v 1.114 1997/07/14 23:45:07 wessels Exp $
+ * $Id: tools.cc,v 1.115 1997/07/15 05:34:13 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
n = max;
return (cur * (n - 1)) + new / n;
}
+
+void
+logsFlush(void)
+{
+ if (debug_log)
+ fflush(debug_log);
+ if (cache_useragent_log)
+ fflush(cache_useragent_log);
+}
/*
- * $Id: unlinkd.cc,v 1.7 1997/07/07 05:29:58 wessels Exp $
+ * $Id: unlinkd.cc,v 1.8 1997/07/15 05:34:14 wessels Exp $
*
* DEBUG: section 43 Unlink Daemon
* AUTHOR: Duane Wessels
wfd1 = squid_to_unlinkd[1];
rfd2 = unlinkd_to_squid[0];
wfd2 = unlinkd_to_squid[1];
+ /* flush or else we get dup data if unbuffered_logs is set */
+ logsFlush();
if ((pid = fork()) < 0) {
debug(50, 0) ("unlinkdCreate: fork: %s\n", xstrerror());
close(rfd1);
/*
- * $Id: useragent.cc,v 1.7 1997/06/04 06:16:16 wessels Exp $
+ * $Id: useragent.cc,v 1.8 1997/07/15 05:34:14 wessels Exp $
*
* DEBUG: section 40 User-Agent logging
* AUTHOR: Joe Ramey <ramey@csc.ti.com>
#include "squid.h"
-FILE *cache_useragent_log = NULL;
-
void
useragentOpenLog(void)
{