mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* signal.c (ruby_signal): Don't set SA_SIGINFO for SIG_IGN and
SIG_DFL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d1f332d16a
commit
99acd378d8
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Sep 6 00:49:41 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* signal.c (ruby_signal): Don't set SA_SIGINFO for SIG_IGN and
|
||||
SIG_DFL.
|
||||
|
||||
Fri Sep 5 21:45:33 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (disable_child_handler_before_fork): New function.
|
||||
|
|
10
signal.c
10
signal.c
|
@ -569,8 +569,14 @@ ruby_signal(int signum, sighandler_t handler)
|
|||
|
||||
sigemptyset(&sigact.sa_mask);
|
||||
#ifdef USE_SIGALTSTACK
|
||||
sigact.sa_sigaction = (ruby_sigaction_t*)handler;
|
||||
sigact.sa_flags = SA_SIGINFO;
|
||||
if (handler == SIG_IGN || handler == SIG_DFL) {
|
||||
sigact.sa_handler = handler;
|
||||
sigact.sa_flags = 0;
|
||||
}
|
||||
else {
|
||||
sigact.sa_sigaction = (ruby_sigaction_t*)handler;
|
||||
sigact.sa_flags = SA_SIGINFO;
|
||||
}
|
||||
#else
|
||||
sigact.sa_handler = handler;
|
||||
sigact.sa_flags = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue