Project

General

Profile

« Previous | Next » 

Revision aa8a3b23

Added by k0kubun (Takashi Kokubun) over 2 years ago

MJIT: Do not hang after forking with threads

First, rb_mjit_fork should call rb_thread_atfork to stop threads after
fork in the child process. Unfortunately, we cannot use rb_fork_ruby to
prevent this kind of mistakes because MJIT needs special handling of
waiting_pid and mjit_pause/resume.

Second, mjit_waitpid_finished should be checked regardless of
trap_interrupt. It doesn't seem like the flag is not set when SIGCHLD is
handled for an MJIT child process.