[ruby-core:62492] Re: [ruby-trunk - Bug #9751] Process.wait does not work correctly in a thread

From: Eric Wong <normalperson@...>
Date: 2014-05-10 02:54:14 UTC
List: ruby-core #62492
The following one-liner fixes the case where "exit" is called.
However, when "exit"/"exit!" is omitted entirely, it still hangs.
I am out of time for today...

	--- a/thread.c
	+++ b/thread.c
	@@ -3799,6 +3799,7 @@ rb_thread_atfork(void)
	 {
	     rb_thread_atfork_internal(terminate_atfork_i);
	     GET_THREAD()->join_list = NULL;
	+    GET_THREAD()->tag = NULL;
	 
	     /* We don't want reproduce CVE-2003-0900. */
	     rb_reset_random_seed();

(indented so I hope it looks OK in redmine)

In This Thread

Prev Next