ruby-changes:34152
From: nobu <ko1@a...>
Date: Thu, 29 May 2014 23:28:00 +0900 (JST)
Subject: [ruby-changes:34152] nobu:r46233 (trunk): signal.c: return proper member
nobu 2014-05-29 23:27:53 +0900 (Thu, 29 May 2014) New Revision: 46233 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=46233&view=revision Log: 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] Modified files: trunk/ChangeLog trunk/signal.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46232) +++ ChangeLog (revision 46233) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu May 29 23:27:50 2014 Rei Odaira <Rei.Odaira@g...> + + * 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@f...> * io.c (pipe_open): Close pipes when rb_execarg_fixup() raises Index: signal.c =================================================================== --- signal.c (revision 46232) +++ signal.c (revision 46233) @@ -595,7 +595,10 @@ ruby_signal(int signum, sighandler_t han https://github.com/ruby/ruby/blob/trunk/signal.c#L595 rb_bug_errno("sigaction", errno); } } - return old.sa_handler; + if (old.sa_flags & SA_SIGINFO) + return (sighandler_t)old.sa_sigaction; + else + return old.sa_handler; } sighandler_t -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/