* signal.c (trap_handler): trap("SIGSEGV", "DEFAULT") may cause wrong
trap error because SIG_DFL may be zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3dd9a78db
commit
cebc9bb19d
@ -1,6 +1,11 @@
|
|||||||
|
Fri Jun 15 18:56:52 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* signal.c (trap_handler): trap("SIGSEGV", "DEFAULT") may cause wrong
|
||||||
|
trap error because SIG_DFL may be zero.
|
||||||
|
|
||||||
Fri Jun 15 15:55:55 2007 Koichi Sasada <ko1@atdot.net>
|
Fri Jun 15 15:55:55 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* insns.def(setconstant, toregexp): fix to mark object correctly.
|
* insns.def (setconstant, toregexp): fix to mark object correctly.
|
||||||
|
|
||||||
Fri Jun 15 13:24:18 2007 Koichi Sasada <ko1@atdot.net>
|
Fri Jun 15 13:24:18 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
13
signal.c
13
signal.c
@ -634,10 +634,15 @@ struct trap_arg {
|
|||||||
VALUE cmd;
|
VALUE cmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static RETSIGTYPE
|
||||||
|
wrong_trap(int sig)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static sighandler_t
|
static sighandler_t
|
||||||
trap_handler(VALUE *cmd)
|
trap_handler(VALUE *cmd)
|
||||||
{
|
{
|
||||||
sighandler_t func = 0;
|
sighandler_t func = wrong_trap;
|
||||||
VALUE command;
|
VALUE command;
|
||||||
|
|
||||||
if (NIL_P(*cmd)) {
|
if (NIL_P(*cmd)) {
|
||||||
@ -674,7 +679,7 @@ trap_handler(VALUE *cmd)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!func) {
|
if (func == wrong_trap) {
|
||||||
rb_raise(rb_eArgError, "wrong trap - %s", RSTRING_PTR(command));
|
rb_raise(rb_eArgError, "wrong trap - %s", RSTRING_PTR(command));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1047,14 +1052,10 @@ Init_signal(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SIGBUS
|
#ifdef SIGBUS
|
||||||
# ifndef RUBY_GC_STRESS
|
|
||||||
install_sighandler(SIGBUS, sigbus);
|
install_sighandler(SIGBUS, sigbus);
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGSEGV
|
#ifdef SIGSEGV
|
||||||
# ifndef RUBY_GC_STRESS
|
|
||||||
install_sighandler(SIGSEGV, sigsegv);
|
install_sighandler(SIGSEGV, sigsegv);
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGPIPE
|
#ifdef SIGPIPE
|
||||||
install_sighandler(SIGPIPE, sigpipe);
|
install_sighandler(SIGPIPE, sigpipe);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user