#
-# $Id: cf.data.pre,v 1.209 2001/01/28 00:45:45 hno Exp $
+# $Id: cf.data.pre,v 1.210 2001/01/30 10:06:48 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
TYPE: string
LOC: Config.coredump_dir
DEFAULT: none
+DEFAULT_IF_NONE: none
DOC_START
- By default Squid leaves core files in the first cache_dir
- directory. If you set 'coredump_dir' to a directory
+ By default Squid leaves core files in the directory from where
+ it was started. If you set 'coredump_dir' to a directory
that exists, Squid will chdir() to that directory at startup
and coredump files will be left there.
+
+NOCOMMENT_START
+# Leave coredumps in the first cache dir
+coredump_dir @DEFAULT_SWAP_DIR@
+NOCOMMENT_END
DOC_END
NAME: redirector_bypass
/*
- * $Id: main.cc,v 1.331 2001/01/12 00:37:19 wessels Exp $
+ * $Id: main.cc,v 1.332 2001/01/30 10:06:50 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
debug(50, 0) ("chdir: %s: %s\n", Config.coredump_dir, xstrerror());
}
}
- if (!Config.effectiveUser) {
- char *p = getcwd(NULL, 0);
- debug(0, 1) ("Current Directory is %s\n", p);
- xfree(p);
- return;
- }
- /* we were probably started as root, so cd to a swap
- * directory in case we dump core */
- if (!chdir(storeSwapDir(0))) {
- debug(0, 1) ("Set Current Directory to %s\n", storeSwapDir(0));
- return;
- } else {
- debug(50, 0) ("%s: %s\n", storeSwapDir(0), xstrerror());
- fatal_dump("Cannot cd to swap directory?");
- }
+ debug(0, 1) ("Current Directory is %s\n", p);
+ xfree(p);
+ return;
}
static void