[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[ruby-core:63407] [ruby-trunk - Bug #9878] ruby_signal() should return either sa_sigaction or sa_handler, depending on SA_SIGINFO
From:
nagachika00@...
Date:
2014-06-29 17:56:43 UTC
List:
ruby-core #63407
Issue #9878 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE
Backported into `ruby_2_1` at r46616.
----------------------------------------
Bug #9878: ruby_signal() should return either sa_sigaction or sa_handler, depending on SA_SIGINFO
https://bugs.ruby-lang.org/issues/9878#change-47450
* Author: Rei Odaira
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.2.0dev (2014-05-29 trunk 46222) [x86_64-linux]
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
`ruby_signal()` in signal.c returns `old.sa_handler`,
but it should return either `old.sa_sigaction` or `old.sa_handler`,
depending on whether `SA_SIGINFO` is set in `old.sa_flags`.
~~~diff
--- signal.c (revision 46222)
+++ signal.c (working copy)
@@ -595,7 +595,10 @@
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
~~~
The original code happens to be correct on the environments
where `sa_handler` and `sa_sigaction` are union, but it is not
guaranteed in general.
(Actually, they are not union on z/OS.)
--
https://bugs.ruby-lang.org/