summaryrefslogtreecommitdiff
path: root/lib/c-stack.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-12-06 15:01:09 +0100
committerBruno Haible <bruno@clisp.org>2008-12-06 15:01:09 +0100
commit67461c3ae4e118020b974b6632156494a9a7ce40 (patch)
tree98326ba2db8933f73ee73977944ca6b6790e33df /lib/c-stack.c
parent52c2cd2f06d1ed983abb9d86006ca45a75181b2e (diff)
downloadgnulib-67461c3ae4e118020b974b6632156494a9a7ce40.tar.gz
Treat SIGBUS like SIFSEGV on platforms that need it.
Diffstat (limited to 'lib/c-stack.c')
-rw-r--r--lib/c-stack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 11cb9efc61..ae300af0f7 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -321,6 +321,10 @@ c_stack_action (void (*action) (int))
act.sa_handler = die;
# endif
+# if FAULT_YIELDS_SIGBUS
+ if (sigaction (SIGBUS, &act, NULL) < 0)
+ return -1;
+# endif
return sigaction (SIGSEGV, &act, NULL);
}