[master] f8dd42a Expand the SIGSEGV handler to also cover SIGBUS

Poul-Henning Kamp phk at FreeBSD.org
Sun May 17 10:56:04 CEST 2015


commit f8dd42a485fa0ba79f99733b3a20aa9d6f71319b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun May 17 08:55:44 2015 +0000

    Expand the SIGSEGV handler to also cover SIGBUS

diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 9ce3aaa..450ec9c 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -377,6 +377,7 @@ mgt_launch_child(struct cli *cli)
 			sa.sa_sigaction = child_sigsegv_handler;
 			sa.sa_flags = SA_SIGINFO;
 			(void)sigaction(SIGSEGV, &sa, NULL);
+			(void)sigaction(SIGBUS, &sa, NULL);
 		}
 		(void)signal(SIGINT, SIG_DFL);
 		(void)signal(SIGTERM, SIG_DFL);
diff --git a/bin/varnishd/mgt/mgt_param_tbl.c b/bin/varnishd/mgt/mgt_param_tbl.c
index ceb6b35..ae69bee 100644
--- a/bin/varnishd/mgt/mgt_param_tbl.c
+++ b/bin/varnishd/mgt/mgt_param_tbl.c
@@ -505,7 +505,7 @@ struct parspec mgt_parspec[] = {
 	{ "sigsegv_handler", tweak_bool, &mgt_param.sigsegv_handler,
 		NULL, NULL,
 		"Install a signal handler which tries to dump debug "
-		"information on segmentation faults.",
+		"information on segmentation and buserror faults.",
 		MUST_RESTART,
 		"off", "bool" },
 	{ "vcl_dir", tweak_string, &mgt_vcl_dir,



More information about the varnish-commit mailing list