Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2986e0

Browse files
normaltenderlove
normal
authored andcommitted
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
1 parent ca9b30a commit d2986e0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

thread_sync.c

+1
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,7 @@ condvar_ptr(VALUE self)
12951295

12961296
/* forked children can't reach into parent thread stacks */
12971297
if (cv->fork_gen != fork_gen) {
1298+
cv->fork_gen = fork_gen;
12981299
list_head_init(&cv->waitq);
12991300
}
13001301

0 commit comments

Comments
 (0)