diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 04:43:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 04:43:38 +0000 |
commit | 75212993250d84b04bae19689ddeb5c12e4e23b8 (patch) | |
tree | 395a8de35b14468bea24f4c90fe82a1cea958603 /thread.c | |
parent | 8d292a08dfb79ec9a55673eb570f1c5128cc47ec (diff) | |
download | ruby-75212993250d84b04bae19689ddeb5c12e4e23b8.tar.gz |
* 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
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); } |