diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-14 07:08:24 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-14 07:08:24 +0000 |
commit | ce65dfa3a60f436334ccf4530ba39eb0b63e1998 (patch) | |
tree | d020b90059712828987fcd3ef4a25f0d1a7bdd7c | |
parent | 9120d051e14a69d3c1e439d65d85a4a8060d62fb (diff) |
merge revision(s) 48884,48885: [Backport #10615]
* signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT,
should be treated before calling signal(2).
[Bug #10615]
should be treated before calling signal(3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | signal.c | 11 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Wed Jan 14 16:07:11 2015 NAKAMURA Usaku <usa@ruby-lang.org> + + * signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT, + should be treated before calling signal(3). + [Bug #10615] + Wed Jan 14 15:57:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * thread.c (exec_recursive): use the same last method name as @@ -533,6 +533,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 */ @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2015-01-14" -#define RUBY_PATCHLEVEL 608 +#define RUBY_PATCHLEVEL 609 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 1 |