Re: dump core on fatal()

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 9 Aug 2001 19:02:41 +0800

On Thu, Aug 09, 2001, Chemolli Francesco (USI) wrote:
> 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).

What do people think? I'll patch 23, 24 and HEAD with this
if I don't hear any negative feedback.

ADrian (who should learn to hit G instead of R..)

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

-- 
Adrian Chadd			Yeah, for me its (XML) like the movie Titanic.
<adrian@creative.net.au>	  Everybody loves it.
				    I want to be different, so I hate it.
					--Duane Wessels
Received on Thu Aug 09 2001 - 05:02:45 MDT

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