r406 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Jul 10 15:48:01 CEST 2006
Author: phk
Date: 2006-07-10 15:48:01 +0200 (Mon, 10 Jul 2006)
New Revision: 406
Modified:
trunk/varnish-cache/bin/varnishd/shmlog.c
Log:
Dump errno and strerror in assert
Modified: trunk/varnish-cache/bin/varnishd/shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-07-10 12:00:20 UTC (rev 405)
+++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-07-10 13:48:01 UTC (rev 406)
@@ -172,3 +172,16 @@
memset(VSL_stats, 0, sizeof *VSL_stats);
}
+/*--------------------------------------------------------------------*/
+
+void
+__assert(const char *func, const char *file, int line, const char *failedexpr)
+{
+ (void)fprintf(stderr,
+ "\r\nAssertion failed: (%s)\n"
+ " function %s, file %s, line %d.\n"
+ " errno %d = \"%s\"\n",
+ failedexpr, func, file, line, errno, strerror(errno));
+ abort();
+ /* NOTREACHED */
+}
More information about the varnish-commit
mailing list