Commit aa8a3b2
committed
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.1 parent c22a668 commit aa8a3b2
2 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4222 | 4222 | | |
4223 | 4223 | | |
4224 | 4224 | | |
| 4225 | + | |
4225 | 4226 | | |
4226 | 4227 | | |
4227 | 4228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2321 | 2321 | | |
2322 | 2322 | | |
2323 | 2323 | | |
| 2324 | + | |
2324 | 2325 | | |
2325 | 2326 | | |
2326 | | - | |
2327 | | - | |
2328 | | - | |
2329 | | - | |
2330 | | - | |
2331 | | - | |
2332 | | - | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
2333 | 2332 | | |
| 2333 | + | |
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
| |||
0 commit comments