1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* signal.c (sig_trap): show signal name on error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-02-23 10:57:55 +00:00
parent 845b21064c
commit 57e95f86be
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Feb 23 19:56:48 2012 Tanaka Akira <akr@fsij.org>
* signal.c (sig_trap): show signal name on error.
Thu Feb 23 12:21:48 2012 Tanaka Akira <akr@fsij.org>
* ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of

View file

@ -937,7 +937,11 @@ sig_trap(int argc, VALUE *argv)
arg.sig = trap_signm(argv[0]);
if (reserved_signal_p(arg.sig)) {
rb_raise(rb_eArgError, "can't trap reserved signal");
const char *name = signo2signm(arg.sig);
if (name)
rb_raise(rb_eArgError, "can't trap reserved signal: SIG%s", name);
else
rb_raise(rb_eArgError, "can't trap reserved signal: %d", (int)arg.sig);
}
if (argc == 1) {