* signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT,

should be treated before calling signal(2).
  [Bug #10615]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-12-18 05:26:57 +00:00
Родитель 3bd4d51149
Коммит 42496f2f33
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Thu Dec 18 14:25:17 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT,
should be treated before calling signal(2).
[Bug #10615]
Wed Dec 17 12:20:56 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compile.c (rb_method_for_self_aref, rb_method_for_self_aset):

Просмотреть файл

@ -634,6 +634,17 @@ posix_signal(int signum, sighandler_t handler)
return ruby_signal(signum, handler);
}
#elif defined _WIN32
static inline sighandler_t
ruby_signal(int signum, sighandler_t handler)
{
if (signum == SIGKILL) {
errno = EINVAL;
return SIG_ERR;
}
return signal(signum, handler);
}
#else /* !POSIX_SIGNAL */
#define ruby_signal(sig,handler) (/* rb_trap_accept_nativethreads[(sig)] = 0,*/ signal((sig),(handler)))
#if 0 /* def HAVE_NATIVETHREAD */