summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-09-06 11:43:46 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2022-09-06 15:42:02 +0900
commitf6925fab853ffc1872038f33d93e4e5c5379b4db (patch)
treea0dc7ae8b69a6b7092c4394344d3d68d2e354f10 /thread.c
parentf4dbfa0f04448386a662611682adf6b2219089a4 (diff)
Do not fork the process on --mjit-wait
fork is for parallel compilation, but --mjit-wait cancels it. It's more useful to not fork it for binding.irb, debugging, etc.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index b271128193..c42c79914d 100644
--- a/thread.c
+++ b/thread.c
@@ -2323,7 +2323,7 @@ rb_threadptr_execute_interrupts(rb_thread_t *th, int blocking_timing)
// outside ruby_sigchld_handler to avoid recursively relying on the SIGCHLD handler.
if (mjit_waitpid_finished) {
mjit_waitpid_finished = false;
- mjit_notify_waitpid(mjit_waitpid_status);
+ mjit_notify_waitpid(WIFEXITED(mjit_waitpid_status) ? WEXITSTATUS(mjit_waitpid_status) : -1);
}
#endif
}