ruby-changes:35335
From: akr <ko1@a...>
Date: Sat, 6 Sep 2014 00:50:31 +0900 (JST)
Subject: [ruby-changes:35335] akr:r47417 (trunk): * signal.c (ruby_signal): Don't set SA_SIGINFO for SIG_IGN and
akr 2014-09-06 00:50:24 +0900 (Sat, 06 Sep 2014) New Revision: 47417 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47417 Log: * signal.c (ruby_signal): Don't set SA_SIGINFO for SIG_IGN and SIG_DFL. Modified files: trunk/ChangeLog trunk/signal.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47416) +++ ChangeLog (revision 47417) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Sep 6 00:49:41 2014 Tanaka Akira <akr@f...> + + * 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@f...> * process.c (disable_child_handler_before_fork): New function. Index: signal.c =================================================================== --- signal.c (revision 47416) +++ signal.c (revision 47417) @@ -569,8 +569,14 @@ ruby_signal(int signum, sighandler_t han https://github.com/ruby/ruby/blob/trunk/signal.c#L569 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/