summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-09 23:13:59 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-09 23:22:15 +0900
commit891cbd66a411725d7300a28b1a95619c2902f0eb (patch)
tree58d4c2749523b7c1bc083d8686e6ce5cc02e5355 /vm_core.h
parentdd477df411691803fc5a83c7daa64faac112a0e4 (diff)
signal.c: save the original sighandlers for fatal signals
On Android, a signal handler that is not SIG_DFL is set by default for SIGSEGV. Ruby's install_sighandler inserts Ruby's handler only when the signal has no handler, so it does not insert Ruby's SEGV report handler, which caused some test failures. This changeset forces to install Ruby's handler for some fatal signals (sigbus, sigsegv, and sigill). They keep the original handlers, and call them when the interpreter receives the signals.
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 052b1b5c0d..30559b0255 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1624,7 +1624,7 @@ extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const
#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
void rb_vm_bugreport(const void *);
-NORETURN(void rb_bug_for_fatal_signal(const void *, const char *fmt, ...));
+NORETURN(void rb_bug_for_fatal_signal(RETSIGTYPE (*default_sighandler)(int), int sig, const void *, const char *fmt, ...));
/* functions about thread/vm execution */
RUBY_SYMBOL_EXPORT_BEGIN