Skip to content

Commit

Permalink
* eval.c (rb_thread_switch): convert all exceptions to
Browse files Browse the repository at this point in the history
  SystemExit.  fixed: [ruby-core:05724]

* eval.c (rb_thread_terminated): show backtrace before propagate
  exceptions to main thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Sep 7, 2005
1 parent e9e21c9 commit 9e23e9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
Wed Sep 7 10:45:15 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>

* eval.c (rb_thread_switch): convert all exceptions to
SystemExit. fixed: [ruby-core:05724]

* eval.c (rb_thread_terminated): show backtrace before propagate
exceptions to main thread.

Wed Sep 7 08:35:04 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>

* Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not load
Expand Down
4 changes: 4 additions & 0 deletions eval.c
Expand Up @@ -10067,6 +10067,9 @@ rb_thread_switch(n)
case RESTORE_EXIT:
ruby_errinfo = th_raise_exception;
ruby_current_node = th_raise_node;
if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
terminate_process(EXIT_FAILURE, ruby_errinfo);
}
rb_exc_raise(th_raise_exception);
break;
case RESTORE_NORMAL:
Expand Down Expand Up @@ -11623,6 +11626,7 @@ rb_thread_start_0(fn, arg, th)
}
else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
/* exit on main_thread */
error_print();
rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
}
else {
Expand Down

0 comments on commit 9e23e9a

Please sign in to comment.