summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-13 02:04:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-13 02:04:10 +0000
commit8022385ba4d7031031372846d62d686422c108ed (patch)
tree2571cd2c36d27cb3d7b679768e4834217c30a4b0 /signal.c
parent5ba5d4c889a4f80f39be65d52746e4528b6f20e2 (diff)
* debug.c (ruby_set_debug_option): define always for binary
compatibility with debug env enabled binary. * signal.c (ruby_enable_coredump): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/signal.c b/signal.c
index ba3595454a..4906e9162a 100644
--- a/signal.c
+++ b/signal.c
@@ -1041,8 +1041,9 @@ ruby_sig_finalize(void)
}
-#ifdef RUBY_DEBUG_ENV
int ruby_enable_coredump = 0;
+#ifndef RUBY_DEBUG_ENV
+#define ruby_enable_coredump 0
#endif
/*
@@ -1116,18 +1117,15 @@ Init_signal(void)
install_sighandler(SIGUSR2, sighandler);
#endif
-#ifdef RUBY_DEBUG_ENV
- if (!ruby_enable_coredump)
-#endif
- {
+ if (!ruby_enable_coredump) {
#ifdef SIGBUS
- install_sighandler(SIGBUS, sigbus);
+ install_sighandler(SIGBUS, sigbus);
#endif
#ifdef SIGSEGV
# ifdef USE_SIGALTSTACK
- rb_register_sigaltstack(GET_THREAD());
+ rb_register_sigaltstack(GET_THREAD());
# endif
- install_sighandler(SIGSEGV, (sighandler_t)sigsegv);
+ install_sighandler(SIGSEGV, (sighandler_t)sigsegv);
#endif
}
#ifdef SIGPIPE