summaryrefslogtreecommitdiffstats
path: root/eval_error.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-19 17:37:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-19 17:37:03 +0000
commitfe32f825f2efc2c5629048f6b1db8ec094f9a1c8 (patch)
treed5df9db3b8de33463cf782336d1e3edd240dde73 /eval_error.h
parent2fd663d256c75bf34e46df0013022fe0a0d01a88 (diff)
downloadruby-fe32f825f2efc2c5629048f6b1db8ec094f9a1c8.tar.gz
ruby-fe32f825f2efc2c5629048f6b1db8ec094f9a1c8.tar.xz
ruby-fe32f825f2efc2c5629048f6b1db8ec094f9a1c8.zip
* eval.c (ruby_cleanup): re-send signal. [ruby-dev:30516]
* eval_error.h (error_handle): no message when exiting by signal. * intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes. * signal.c (esignal_init): takes a signal number and an optional signal name. * signal.c (interrupt_init): pass SIGINT always. * signal.c (ruby_default_signal): invoke system default signal handler. * signal.c (rb_f_kill): use NUM2PIDT instead of NUM2INT. * signal.c (rb_signal_exec, trap): handle SIGTERM. [ruby-dev:30505] * thread.c (rb_thread_signal_raise): now takes signal number instead of signal name. * thread.c (rb_thread_signal_exit): since rb_make_exception() calls #exception method, rb_class_new_instance() is not needed here. * yarvcore.h (struct rb_vm_struct), eval_jump.h (terminate_process): exit_code is no longer stored in VM. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.h')
-rw-r--r--eval_error.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/eval_error.h b/eval_error.h
index 38e85a1d3..155986e83 100644
--- a/eval_error.h
+++ b/eval_error.h
@@ -233,14 +233,19 @@ error_handle(int ex)
warn_printf(": unexpected throw\n");
break;
case TAG_RAISE:
- case TAG_FATAL:
- if (rb_obj_is_kind_of(GET_THREAD()->errinfo, rb_eSystemExit)) {
- status = sysexit_status(GET_THREAD()->errinfo);
+ case TAG_FATAL: {
+ VALUE errinfo = GET_THREAD()->errinfo;
+ if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) {
+ status = sysexit_status(errinfo);
+ }
+ else if (rb_obj_is_instance_of(errinfo, rb_eSignal)) {
+ /* no message when exiting by signal */
}
else {
error_print();
}
break;
+ }
default:
rb_bug("Unknown longjmp status %d", ex);
break;