From 5f6b31c23ff1eefdf3cd5807ce5f80abf24eb1b2 Mon Sep 17 00:00:00 2001 From: Sharon Rosner Date: Fri, 5 Dec 2025 06:20:39 +0100 Subject: Correctly handle `Process.fork` with an active `Fiber.scheduler`. (#15385) In the child process, nullify the current fiber scheduler and set the current fiber to blocking. --- thread.c | 1 + 1 file changed, 1 insertion(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 6e5c8e89ff..5f592a4256 100644 --- a/thread.c +++ b/thread.c @@ -4997,6 +4997,7 @@ rb_thread_atfork(void) rb_threadptr_pending_interrupt_clear(th); rb_thread_atfork_internal(th, terminate_atfork_i); th->join_list = NULL; + th->scheduler = Qnil; rb_fiber_atfork(th); /* We don't want reproduce CVE-2003-0900. */ -- cgit v1.2.3