summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-23 04:17:52 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-23 04:17:52 +0000
commit7c9a77f88031afaba8338cf7188bfa7391f8a06a (patch)
treeec9b8fcdc099ea997e92e6defb5c64ba4b7171ac /signal.c
parent31c82916188aa9f42832b8694da7bd5fc0048e15 (diff)
* signal.c (ALT_STACK_SIZE): 4KB is not enough on Mac OS X.
Uses SIGSTKSZ. this fixes [ruby-core:20040]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20331 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 38dd55f885..0c98237f46 100644
--- a/signal.c
+++ b/signal.c
@@ -416,7 +416,11 @@ typedef RETSIGTYPE (*sighandler_t)(int);
#ifdef POSIX_SIGNAL
#ifdef USE_SIGALTSTACK
+#ifdef SIGSTKSZ
+#define ALT_STACK_SIZE SIGSTKSZ
+#else
#define ALT_STACK_SIZE (4*1024)
+#endif
/* alternate stack for SIGSEGV */
static void register_sigaltstack() {
stack_t newSS, oldSS;