From 3ba502d5f01a39b4adfd456ffc29f0f13c106267 Mon Sep 17 00:00:00 2001 From: kosaki Date: Mon, 4 Apr 2011 12:43:28 +0000 Subject: * io.c (rb_io_syswrite): While local FS writes are usually buffered, the buffers can be full or the file opened with O_SYNC. IO#syswrite can also be used on blocking IOs (pipe/socket) just like IO#write. The patch is written by Eric Wong. [ruby-core:35554] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index 331420097a..7ce7148627 100644 --- a/io.c +++ b/io.c @@ -3958,7 +3958,7 @@ rb_io_syswrite(VALUE io, VALUE str) rb_io_check_closed(fptr); } - n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str)); + n = rb_write_internal(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str)); if (n == -1) rb_sys_fail_path(fptr->pathv); -- cgit v1.2.3