From d78bf437083229842925c45f4190d29773026e1b Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 9 Oct 2024 17:19:05 +1300 Subject: [PATCH] Update `UNIXSocket` to use `rb_io_blocking_region`. --- ext/socket/unixsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c index a8475e3e60..b08e3bb708 100644 --- a/ext/socket/unixsocket.c +++ b/ext/socket/unixsocket.c @@ -288,7 +288,7 @@ unix_send_io(VALUE sock, VALUE val) #endif arg.fd = fptr->fd; - while ((int)BLOCKING_REGION_FD(sendmsg_blocking, &arg) == -1) { + while ((int)rb_io_blocking_region(fptr, sendmsg_blocking, &arg) == -1) { if (!rb_io_wait_writable(arg.fd)) rsock_sys_fail_path("sendmsg(2)", fptr->pathv); } @@ -390,7 +390,7 @@ retry: #endif arg.fd = fptr->fd; - while ((int)BLOCKING_REGION_FD(recvmsg_blocking, &arg) == -1) { + while ((int)rb_io_blocking_region(fptr, recvmsg_blocking, &arg) == -1) { int e = errno; if (e == EMSGSIZE && !(gc_reason & GC_REASON_EMSGSIZE)) { /* FreeBSD gets here when we're out of FDs */