mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread_pthread.c (rb_thread_create_timer_thread): destroy attr even
if pthread_create() failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
60c49e94eb
commit
b7573a0081
2 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Dec 30 04:10:13 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
||||
|
||||
* thread_pthread.c (rb_thread_create_timer_thread): destroy attr even
|
||||
if pthread_create() failed.
|
||||
|
||||
Wed Dec 30 02:55:09 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* thread_pthread.c (setup_communication_pipe): delay setting owner
|
||||
|
|
|
@ -1599,6 +1599,7 @@ rb_thread_create_timer_thread(void)
|
|||
}
|
||||
#ifdef HAVE_PTHREAD_ATTR_INIT
|
||||
err = pthread_create(&timer_thread.id, &attr, thread_timer, &GET_VM()->gvl);
|
||||
pthread_attr_destroy(&attr);
|
||||
#else
|
||||
err = pthread_create(&timer_thread.id, NULL, thread_timer, &GET_VM()->gvl);
|
||||
#endif
|
||||
|
@ -1617,9 +1618,6 @@ rb_thread_create_timer_thread(void)
|
|||
/* validate pipe on this process */
|
||||
timer_thread_pipe.owner_process = getpid();
|
||||
timer_thread.created = 1;
|
||||
#ifdef HAVE_PTHREAD_ATTR_INIT
|
||||
pthread_attr_destroy(&attr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue