summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-30 23:47:21 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-30 23:47:21 (GMT)
commitd2f52a5fb7835c299d0b769e2d0423d80c522fc8 (patch)
treeb6f131ac8ea893647124f7a6e02fd99b0be7864f /thread_sync.c
parent5e5b2fe69b3d5ac7cf6a8eedf4355bc8d1acc97c (diff)
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
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread_sync.c b/thread_sync.c
index 7bdef32..e7702f1 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -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);
}