summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-18 08:25:48 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-18 08:25:48 +0000
commitfe6974a8fcca42f4f83171097a3bc29fbe0f2f67 (patch)
tree01f157d468dc018c5765144f344e98a37a584c62 /thread.c
parent0a7a5a7ad4da3ec8bed425502f5012908a0e77c8 (diff)
mjit_worker.c: support MJIT in forked Ruby process
by launching MJIT worker thread in child Ruby process. See the comment before `mjit_child_after_fork` for details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 37950f0139..8420808c40 100644
--- a/thread.c
+++ b/thread.c
@@ -4438,6 +4438,8 @@ rb_thread_atfork(void)
/* We don't want reproduce CVE-2003-0900. */
rb_reset_random_seed();
+
+ /* For child, starting MJIT worker thread in this place which is safer than `after_fork_ruby`. */
mjit_child_after_fork();
}