thread_sync.c (condvar_ptr): reset fork_gen after forking

Otherwise the condition variable waiter list will always
be empty, which is wrong :x

[Bug #14725] [Bug #14634]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-04-30 23:47:21 +00:00
parent 5e5b2fe69b
commit d2f52a5fb7
1 changed files with 1 additions and 0 deletions

View File

@ -1308,6 +1308,7 @@ condvar_ptr(VALUE self)
/* forked children can't reach into parent thread stacks */
if (cv->fork_gen != fork_gen) {
cv->fork_gen = fork_gen;
list_head_init(&cv->waitq);
}