зеркало из https://github.com/github/ruby.git
* thread.c (rb_thread_atfork): should not leave living_threads
referring freed table while allocating new table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8d292a08df
Коммит
7521299325
|
@ -1,3 +1,8 @@
|
|||
Mon Dec 24 13:43:36 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread.c (rb_thread_atfork): should not leave living_threads
|
||||
referring freed table while allocating new table.
|
||||
|
||||
Mon Dec 24 12:49:54 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
|
||||
|
|
5
thread.c
5
thread.c
|
@ -1974,11 +1974,10 @@ rb_thread_atfork(void)
|
|||
{
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
rb_vm_t *vm = th->vm;
|
||||
volatile VALUE thval = th->self;
|
||||
VALUE thval = th->self;
|
||||
vm->main_thread = th;
|
||||
|
||||
st_free_table(vm->living_threads);
|
||||
vm->living_threads = st_init_numtable();
|
||||
st_clear(vm->living_threads);
|
||||
st_insert(vm->living_threads, thval, (st_data_t) th->thread_id);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче