summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2022-10-11 10:18:20 +1300
committerGitHub <noreply@github.com>2022-10-11 10:18:20 +1300
commit1bafa4a59b296e6ca80e32755fc84b76c3c575e5 (patch)
tree179f15f64f9eaffd62d0e69d7b667fe8e68145a7 /io.c
parent1a7e7bb2d1dd507a6fdf883548633bdd14bf6854 (diff)
downloadruby-1bafa4a59b296e6ca80e32755fc84b76c3c575e5.tar.gz
Ignore failure to set nonblock mode. (#6524)
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 6cde02aaae..99513573d7 100644
--- a/io.c
+++ b/io.c
@@ -3571,7 +3571,7 @@ io_read_nonblock(rb_execution_context_t *ec, VALUE io, VALUE length, VALUE str,
n = read_buffered_data(RSTRING_PTR(str), len, fptr);
if (n <= 0) {
- rb_io_set_nonblock(fptr);
+ rb_fd_set_nonblock(fptr->fd);
shrinkable |= io_setstrbuf(&str, len);
iis.fptr = fptr;
iis.nonblock = 1;
@@ -3618,7 +3618,7 @@ io_write_nonblock(rb_execution_context_t *ec, VALUE io, VALUE str, VALUE ex)
if (io_fflush(fptr) < 0)
rb_sys_fail_on_write(fptr);
- rb_io_set_nonblock(fptr);
+ rb_fd_set_nonblock(fptr->fd);
n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
RB_GC_GUARD(str);