[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

Re: [BUG] segfault on Proc#call after setting a trace_func

From: Yukihiro Matsumoto <matz@...>
Date: 2006-05-06 14:42:56 UTC
List: ruby-core #7835
Hi,

In message "Re: [BUG] segfault on Proc#call after setting a trace_func"
    on Sat, 6 May 2006 20:59:06 +0900, ts <decoux@moulon.inra.fr> writes:

|M> l.call
|
| Not sure, but it seems to be in proc_invoke()
|
|    /* modify current frame */
|    ruby_frame->block = &_block;

| Unfortunately the old block (ruby_frame->block) is never restored when
| ruby leave proc_invoke()

That's it.  Thank you.  Here's the patch to fix this.

							matz.

--- eval.c	23 Feb 2006 04:24:39 -0000	1.890
+++ eval.c	6 May 2006 14:41:49 -0000
@@ -8266,3 +8243,3 @@ proc_invoke(VALUE proc, VALUE args /* OK
     struct BLOCK _block;
-    struct BLOCK *data;
+    struct BLOCK *data, *old_block;
     volatile VALUE result = Qundef;
@@ -8304,2 +8277,3 @@ proc_invoke(VALUE proc, VALUE args /* OK
     /* modify current frame */
+    old_block = ruby_frame->block;
     ruby_frame->block = &_block;
@@ -8316,2 +8290,3 @@ proc_invoke(VALUE proc, VALUE args /* OK
     POP_TAG();
+    ruby_frame->block = old_block;
     ruby_wrapper = old_wrapper;

In This Thread