mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
5e5b2fe69b
commit
d2f52a5fb7
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue