[#75687] [Ruby trunk Bug#12416] struct rb_id_table lacks mark function — shyouhei@...
Issue #12416 has been reported by Shyouhei Urabe.
3 messages
2016/05/23
[#75763] [Ruby trunk Feature#12435] Using connect_nonblock to open TCP connections in Net::HTTP#connect — mohamed.m.m.hafez@...
Issue #12435 has been reported by Mohamed Hafez.
3 messages
2016/05/28
[#75774] Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock — Mohamed Hafez <mohamed.m.m.hafez@...>
Hi all, every now and then in my production server, I'm
4 messages
2016/05/30
[#75775] Re: Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock
— Mohamed Hafez <mohamed.m.m.hafez@...>
2016/05/30
Or does MRI's OpenSSL::SSL::SSLSocket#connect_nonblock just return
[#75782] Important: Somewhat backwards-incompatible change (Fwd: [ruby-cvs:62388] duerst:r55225 (trunk): * string.c: Activate full Unicode case mapping for UTF-8) — Martin J. Dürst <duerst@...>
With the change below, I have activated full Unicode case mapping for
4 messages
2016/05/31
[ruby-core:75316] Re: [ruby-cvs:62052] normal:r54890 (trunk): process.c (disable_child_handler_fork_child): initialize handler for SIGPIPE
From:
Eric Wong <normalperson@...>
Date:
2016-05-02 21:24:34 UTC
List:
ruby-core #75316
normal@ruby-lang.org wrote:
> https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54890
Honestly, I don't understand why we use sigaction in here at all
since all we set is SIG_DFL. signal(2) is portably defined
for SIG_DFL and SIG_IGN. So maybe the following is a welcome
simplification to reduce confusing #ifdefs.
diff --git a/process.c b/process.c
index 6f3fc23..09ddcd0 100644
--- a/process.c
+++ b/process.c
@@ -3485,43 +3485,17 @@ disable_child_handler_fork_child(struct child_handler_disabler_state *old, char
{
int sig;
int ret;
-#ifdef POSIX_SIGNAL
- struct sigaction act, oact;
-
- act.sa_handler = SIG_DFL;
- act.sa_flags = 0;
- ret = sigemptyset(&act.sa_mask); /* async-signal-safe */
- if (ret == -1) {
- ERRMSG("sigemptyset");
- return -1;
- }
-#else
sig_t handler;
-#endif
for (sig = 1; sig < NSIG; sig++) {
int reset = 0;
#ifdef SIGPIPE
if (sig == SIGPIPE) {
reset = 1;
-#ifndef POSIX_SIGNAL
handler = SIG_DFL;
-#endif
}
#endif
if (!reset) {
-#ifdef POSIX_SIGNAL
- ret = sigaction(sig, NULL, &oact); /* async-signal-safe */
- if (ret == -1 && errno == EINVAL) {
- continue; /* Ignore invalid signal number. */
- }
- if (ret == -1) {
- ERRMSG("sigaction to obtain old action");
- return -1;
- }
- reset = (oact.sa_flags & SA_SIGINFO) ||
- (oact.sa_handler != SIG_IGN && oact.sa_handler != SIG_DFL);
-#else
handler = signal(sig, SIG_DFL);
if (handler == SIG_ERR && errno == EINVAL) {
continue; /* Ignore invalid signal number */
@@ -3531,22 +3505,13 @@ disable_child_handler_fork_child(struct child_handler_disabler_state *old, char
return -1;
}
reset = (handler != SIG_IGN && handler != SIG_DFL);
-#endif
}
if (reset) {
-#ifdef POSIX_SIGNAL
- ret = sigaction(sig, &act, NULL); /* async-signal-safe */
- if (ret == -1) {
- ERRMSG("sigaction to set default action");
- return -1;
- }
-#else
handler = signal(sig, handler);
if (handler == SIG_ERR) {
ERRMSG("signal to set default action");
return -1;
}
-#endif
}
}
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>