summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-23 07:07:34 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-23 07:07:34 +0000
commit0abd67ea190c4cb7deacc227c2c9e9e945ac9598 (patch)
tree8526b723ad428cd13e60d4295d8fe60dcedb3da4 /signal.c
parent7606241c6e762a992b358c08956cf63cf6debbde (diff)
* signal.c (default_handler, Init_signal): compile error if
USE_SIGALTSTACK is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index 0c98237f46..3ede0ec6db 100644
--- a/signal.c
+++ b/signal.c
@@ -699,7 +699,9 @@ default_handler(int sig)
#ifdef SIGSEGV
case SIGSEGV:
func = sigsegv;
+#ifdef USE_SIGALTSTACK
register_sigaltstack();
+#endif
break;
#endif
#ifdef SIGPIPE
@@ -1107,7 +1109,9 @@ Init_signal(void)
install_sighandler(SIGBUS, sigbus);
#endif
#ifdef SIGSEGV
+#ifdef USE_SIGALTSTACK
register_sigaltstack();
+#endif
install_sighandler(SIGSEGV, sigsegv);
#endif
}