dump core on fatal()

From: Chemolli Francesco (USI) <ChemolliF@dont-contact.us>
Date: Thu, 9 Aug 2001 12:44:23 +0200

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).

I submit this for inclusion in all squid releases.

Index: tools.c
===================================================================
RCS file: /cvsroot/squid/squid/src/tools.c,v
retrieving revision 1.1.1.3.10.17
diff -u -w -u -r1.1.1.3.10.17 tools.c
--- tools.c 2001/05/18 10:01:17 1.1.1.3.10.17
+++ tools.c 2001/08/09 10:33:47
@@ -354,7 +354,10 @@
     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 */
=== Exit status: 1

-- 
	ing. Francesco Chemolli
	Unicredit Servizi Informativi
Received on Thu Aug 09 2001 - 04:36:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:10 MST