From: adrian <> Date: Sun, 12 Aug 2001 00:27:20 +0000 (+0000) Subject: The four-liner below alters fatal() so that fatal errors cause squid X-Git-Tag: SQUID_3_0_PRE1~1451 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edd3d24f6cef7156558950244eacd242cd7d7c90;p=thirdparty%2Fsquid.git The four-liner below alters fatal() so that fatal errors cause squid to dump core rather than exit more-or-less-cleanly (of course, the actual outcome depends on the user's ulimit settings). Submitted by: Chemolli Francesco --- diff --git a/src/tools.cc b/src/tools.cc index e45464a3bb..91eb9d6834 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.207 2001/04/27 16:23:48 hno Exp $ + * $Id: tools.cc,v 1.208 2001/08/11 18:27:20 adrian Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -354,7 +354,10 @@ fatal(const char *message) if (0 == store_dirs_rebuilding) storeDirWriteCleanLogs(0); fatal_common(message); - exit(shutting_down ? 0 : 1); + if (shutting_down) + exit(0); + else + abort(); } /* printf-style interface for fatal */