зеркало из https://github.com/github/ruby.git
* 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:
Родитель
845b21064c
Коммит
57e95f86be
|
@ -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
|
||||
|
|
6
signal.c
6
signal.c
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче