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:
parent
991e95bb36
commit
67dba250e8
1 changed files with 5 additions and 0 deletions
5
signal.c
5
signal.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue