signal.c: return proper member

* signal.c (ruby_signal): should return either `old.sa_sigaction`
  or `old.sa_handler`, depending on whether `SA_SIGINFO` is set in
  `old.sa_flags`, because they may not be a union.
  [ruby-core:62836] [Bug #9878]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-29 14:27:53 +00:00
Родитель 52e91e0f72
Коммит fad56622f7
2 изменённых файлов: 11 добавлений и 1 удалений

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

@ -1,3 +1,10 @@
Thu May 29 23:27:50 2014 Rei Odaira <Rei.Odaira@gmail.com>
* signal.c (ruby_signal): should return either `old.sa_sigaction`
or `old.sa_handler`, depending on whether `SA_SIGINFO` is set in
`old.sa_flags`, because they may not be a union.
[ruby-core:62836] [Bug #9878]
Thu May 29 23:11:20 2014 Tanaka Akira <akr@fsij.org>
* io.c (pipe_open): Close pipes when rb_execarg_fixup() raises

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

@ -595,6 +595,9 @@ ruby_signal(int signum, sighandler_t handler)
rb_bug_errno("sigaction", errno);
}
}
if (old.sa_flags & SA_SIGINFO)
return (sighandler_t)old.sa_sigaction;
else
return old.sa_handler;
}