diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-29 17:32:36 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-29 17:32:36 +0000 |
commit | 52601dd1cc04becc98777fc8994de18924c18539 (patch) | |
tree | 9c4c99e76b8e6b86b4b8c7f8c3250dedf5878bbf /thread_pthread.c | |
parent | 50864b9d019e2dfd5fb43c5e4ea50917ba2d3f4a (diff) |
merge revision(s) 53373: [Backport #11922]
* thread_pthread.c (setup_communication_pipe): delay setting owner
(rb_thread_create_timer_thread): until thread creation succeeds
[ruby-core:72590] [Bug #11922]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 1acd56c357..a070434afe 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1423,8 +1423,6 @@ setup_communication_pipe(void) return e; } - /* validate pipe on this process */ - timer_thread_pipe.owner_process = getpid(); return 0; } @@ -1632,6 +1630,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); |