mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occured
in at_exit blocks. [ruby-core:11263] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8adc4541ff
commit
31345380ac
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jun 18 13:54:36 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occured
|
||||
in at_exit blocks. [ruby-core:11263]
|
||||
|
||||
Mon Jun 18 02:49:16 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm.c (env_mark): fix to mark block.proc.
|
||||
|
|
14
eval.c
14
eval.c
|
@ -191,8 +191,22 @@ ruby_cleanup(int ex)
|
|||
VALUE sig = rb_iv_get(err, "signo");
|
||||
ruby_default_signal(NUM2INT(sig));
|
||||
}
|
||||
else if (ex == 0) {
|
||||
ex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#if EXIT_SUCCESS != 0 || EXIT_FAILURE != 1
|
||||
switch (ex) {
|
||||
#if EXIT_SUCCESS != 0
|
||||
case 0: return EXIT_SUCCESS;
|
||||
#endif
|
||||
#if EXIT_FAILURE != 1
|
||||
case 1: return EXIT_FAILURE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return ex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue