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 /signal.c | |
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
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 */ |