summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-06-22 16:20:15 +0000
committerJim Meyering <jim@meyering.net>2002-06-22 16:20:15 +0000
commit9e7746f4c0aad390495fc82dda46903766ba12b4 (patch)
treec4844439c8853fa19489269526888d1db2eccf6c /lib
parent7721a2148addd85eabf0033dcb7ea86facbac739 (diff)
downloadcoreutils-9e7746f4c0aad390495fc82dda46903766ba12b4.tar.xz
(segv_handler, c_stack_action) [! defined SA_SIGINFO]:
Do not assume SA_SIGINFO behavior. Bug reported by Jim Meyering on NetBSD 1.5.2.
Diffstat (limited to 'lib')
-rw-r--r--lib/c-stack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 6e724b74c..095f890e5 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -277,7 +277,7 @@ static union
void *p;
} alternate_signal_stack;
-# if defined SA_ONSTACK && defined _SC_PAGESIZE
+# if defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE
/* Handle a segmentation violation and exit. This function is
async-signal-safe. */
@@ -363,7 +363,7 @@ c_stack_action (char * const *argv __attribute__ ((unused)),
stack_overflow_message = _("stack overflow");
{
-# if ! (defined SA_ONSTACK && defined _SC_PAGESIZE)
+# if ! (defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE)
return signal (SIGSEGV, die) == SIG_ERR ? -1 : 0;
# else
struct sigaction act;