summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 37e805358a..9f723d0d64 100644
--- a/thread.c
+++ b/thread.c
@@ -5211,10 +5211,12 @@ ruby_kill(rb_pid_t pid, int sig)
rb_vm_t *vm = GET_VM();
if ((th == vm->main_thread) && (pid == getpid())) {
+ GVL_UNLOCK_BEGIN();
native_mutex_lock(&th->interrupt_lock);
err = kill(pid, sig);
native_cond_wait(&th->interrupt_cond, &th->interrupt_lock);
native_mutex_unlock(&th->interrupt_lock);
+ GVL_UNLOCK_END();
} else {
err = kill(pid, sig);
}