diff --git a/ChangeLog b/ChangeLog index 88b6d10c23..891fb492ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Dec 30 02:55:09 2015 Eric Wong <e@80x24.org> + + * thread_pthread.c (setup_communication_pipe): delay setting owner + (rb_thread_create_timer_thread): until thread creation succeeds + [ruby-core:72590] [Bug #11922] + Tue Dec 29 19:12:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * ruby.c (proc_options): -W command line option should be able to diff --git a/thread_pthread.c b/thread_pthread.c index 2a15816713..46cc5715c4 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1406,8 +1406,6 @@ setup_communication_pipe(void) return e; } - /* validate pipe on this process */ - timer_thread_pipe.owner_process = getpid(); return 0; } @@ -1615,6 +1613,9 @@ rb_thread_create_timer_thread(void) #endif return; } + + /* validate pipe on this process */ + timer_thread_pipe.owner_process = getpid(); timer_thread.created = 1; #ifdef HAVE_PTHREAD_ATTR_INIT pthread_attr_destroy(&attr);