From b93fd91be3861ebe7c75d55c736bef78162acc16 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 24 Dec 2007 04:43:38 +0000 Subject: * thread.c (rb_thread_atfork): should not leave living_threads referring freed table while allocating new table. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index d4916016c..01a39d70b 100644 --- a/thread.c +++ b/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); } -- cgit