summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
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
}