#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.55 1996/11/12 22:36:59 wessels Exp $
+# $Id: Makefile.in,v 1.56 1996/11/19 07:21:12 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
DEFAULT_CACHE_LOG = $(localstatedir)/logs/cache.log
DEFAULT_ACCESS_LOG = $(localstatedir)/logs/access.log
DEFAULT_STORE_LOG = $(localstatedir)/logs/store.log
+DEFAULT_PID_FILE = $(localstatedir)/logs/squid.pid
DEFAULT_SWAP_DIR = $(localstatedir)/cache
DEFAULT_PINGER = $(libexecdir)/pinger
-DDEFAULT_CACHE_LOG=\"$(DEFAULT_CACHE_LOG)\" \
-DDEFAULT_ACCESS_LOG=\"$(DEFAULT_ACCESS_LOG)\" \
-DDEFAULT_STORE_LOG=\"$(DEFAULT_STORE_LOG)\" \
+ -DDEFAULT_PID_FILE=\"$(DEFAULT_PID_FILE)\" \
-DDEFAULT_SWAP_DIR=\"$(DEFAULT_SWAP_DIR)\" \
-DDEFAULT_PINGER=\"$(DEFAULT_PINGER)\"
s%@DEFAULT_CACHE_LOG@%$(DEFAULT_CACHE_LOG)%g;\
s%@DEFAULT_ACCESS_LOG@%$(DEFAULT_ACCESS_LOG)%g;\
s%@DEFAULT_STORE_LOG@%$(DEFAULT_STORE_LOG)%g;\
+ s%@DEFAULT_PID_FILE@%$(DEFAULT_PID_FILE)%g;\
s%@DEFAULT_SWAP_DIR@%$(DEFAULT_SWAP_DIR)%g" < squid.conf.pre >$@
install-mkdirs:
/*
- * $Id: cache_cf.cc,v 1.141 1996/11/18 18:22:01 wessels Exp $
+ * $Id: cache_cf.cc,v 1.142 1996/11/19 07:21:13 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#define DefaultNeighborTimeout 2 /* 2 seconds */
#define DefaultStallDelay 1 /* 1 seconds */
#define DefaultSingleParentBypass 0 /* default off */
-#define DefaultPidFilename (char *)NULL /* default NONE */
+#define DefaultPidFilename DEFAULT_PID_FILE
#define DefaultVisibleHostname (char *)NULL /* default NONE */
#define DefaultFtpUser "squid@" /* Default without domain */
#define DefaultAnnounceHost "sd.cache.nlanr.net"
/*
- * $Id: tools.cc,v 1.83 1996/11/14 18:38:51 wessels Exp $
+ * $Id: tools.cc,v 1.84 1996/11/19 07:21:15 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
fprintf(debug_log, "FATAL: Received Bus Error...dying.\n");
else
fprintf(debug_log, "FATAL: Received signal %d...dying.\n", sig);
+
+#ifdef PRINT_STACK_TRACE
+#ifdef _SQUID_HPUX_
+ {
+ extern void U_STACK_TRACE(void); /* link with -lcl */
+ fflush(debug_log);
+ dup2(fileno(debug_log), 2);
+ U_STACK_TRACE();
+ }
+#endif /* _SQUID_HPUX_ */
+#ifdef _SQUID_SOLARIS_
+ { /* get ftp://opcom.sun.ca/pub/tars/opcom_stack.tar.gz and */
+ extern void opcom_stack_trace(void); /* link with -lopcom_stack */
+ fflush(debug_log);
+ dup2(fileno(debug_log), fileno(stdout));
+ opcom_stack_trace();
+ fflush(stdout);
+ }
+#endif /* _SQUID_SOLARIS_ */
+#endif /* PRINT_STACK_TRACE */
+
#if SA_RESETHAND == 0
signal(SIGSEGV, SIG_DFL);
signal(SIGBUS, SIG_DFL);
normal_shutdown(void)
{
debug(21, 1, "Shutting down...\n");
- if (Config.pidFilename) {
+ if (Config.pidFilename && strcmp(Config.pidFilename, "none")) {
enter_suid();
safeunlink(Config.pidFilename, 0);
leave_suid();
writePidFile(void)
{
FILE *pid_fp = NULL;
- char *f = NULL;
+ const char *f = NULL;
- if ((f = Config.pidFilename) == NULL)
+ if ((f = Config.pidFilename) == NULL || !strcmp(Config.pidFilename, "none"))
return;
enter_suid();
pid_fp = fopen(f, "w");
readPidFile(void)
{
FILE *pid_fp = NULL;
- char *f = NULL;
+ const char *f = NULL;
pid_t pid = -1;
int i;
- if ((f = Config.pidFilename) == NULL) {
+ if ((f = Config.pidFilename) == NULL || !strcmp(Config.pidFilename, "none")) {
fprintf(stderr, "%s: ERROR: No pid file name defined\n", appname);
exit(1);
}