1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

signal.c: consider non-sigaltstack platforms

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-09-10 09:35:03 +00:00
parent 991e95bb36
commit 67dba250e8

View file

@ -621,12 +621,17 @@ ruby_signal(int signum, sighandler_t handler)
case RUBY_SIGCHLD:
if (handler == SIG_IGN) {
ruby_nocldwait = 1;
# ifdef USE_SIGALTSTACK
if (sigact.sa_flags & SA_SIGINFO) {
sigact.sa_sigaction = (ruby_sigaction_t*)sighandler;
}
else {
sigact.sa_handler = sighandler;
}
# else
sigact.sa_handler = handler;
sigact.sa_flags = 0;
# endif
}
else {
ruby_nocldwait = 0;