Skip to content

Commit 2447380

Browse files
committed
Run rb_gc_before_fork after before_exec
before_exec stops the timer thread, which requires locking the Ractor scheduler lock. This may deadlock if rb_gc_before_fork locks the VM.
1 parent 55938a4 commit 2447380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,8 +1575,8 @@ after_exec(void)
15751575
static void
15761576
before_fork_ruby(void)
15771577
{
1578-
rb_gc_before_fork();
15791578
before_exec();
1579+
rb_gc_before_fork();
15801580
}
15811581

15821582
static void

0 commit comments

Comments
 (0)